The Samba-Bugzilla – Attachment 1006 Details for
Bug 2401
add user script not called when deleting/re-adding user from windows
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch committed with revision 5647
2401.diff (text/plain), 2.31 KB, created by
Volker Lendecke
on 2005-03-03 09:56:13 UTC
(
hide
)
Description:
Patch committed with revision 5647
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2005-03-03 09:56:13 UTC
Size:
2.31 KB
patch
obsolete
>Index: auth/auth_util.c >=================================================================== >--- auth/auth_util.c (revision 5646) >+++ auth/auth_util.c (revision 5647) >@@ -50,6 +50,7 @@ > if (homedir) > all_string_sub(add_script, "%H", homedir, sizeof(pstring)); > ret = smbrun(add_script,NULL); >+ flush_pwnam_cache(); > DEBUG(ret ? 0 : 3,("smb_create_user: Running the command `%s' gave %d\n",add_script,ret)); > return ret; > } >Index: groupdb/mapping.c >=================================================================== >--- groupdb/mapping.c (revision 5646) >+++ groupdb/mapping.c (revision 5647) >@@ -1050,6 +1050,7 @@ > all_string_sub(add_script, "%g", unix_group, sizeof(add_script)); > all_string_sub(add_script, "%u", unix_user, sizeof(add_script)); > ret = smbrun(add_script,NULL); >+ flush_pwnam_cache(); > DEBUG(ret ? 0 : 3,("smb_set_primary_group: " > "Running the command `%s' gave %d\n",add_script,ret)); > return ret; >@@ -1060,6 +1061,7 @@ > if ( winbind_set_user_primary_group( unix_user, unix_group ) ) { > DEBUG(3,("smb_delete_group: winbindd set the group (%s) as the primary group for user (%s)\n", > unix_group, unix_user)); >+ flush_pwnam_cache(); > return 0; > } > >Index: lib/util_pw.c >=================================================================== >--- lib/util_pw.c (revision 5646) >+++ lib/util_pw.c (revision 5647) >@@ -70,6 +70,20 @@ > return; > } > >+void flush_pwnam_cache(void) >+{ >+ int i; >+ >+ init_pwnam_cache(); >+ >+ for (i=0; i<PWNAMCACHE_SIZE; i++) { >+ if (pwnam_cache[i] == NULL) >+ continue; >+ >+ passwd_free(&pwnam_cache[i]); >+ } >+} >+ > struct passwd *getpwnam_alloc(const char *name) > { > int i; >Index: rpc_server/srv_samr_nt.c >=================================================================== >--- rpc_server/srv_samr_nt.c (revision 5646) >+++ rpc_server/srv_samr_nt.c (revision 5647) >@@ -2335,6 +2335,7 @@ > > /* implicit call to getpwnam() next. we have a valid SID coming out of this call */ > >+ flush_pwnam_cache(); > nt_status = pdb_init_sam_new(&sam_pass, account, new_rid); > > /* this code is order such that we have no unnecessary retuns >@@ -3805,6 +3806,7 @@ > return -1; > all_string_sub(del_script, "%u", unix_user, sizeof(del_script)); > ret = smbrun(del_script,NULL); >+ flush_pwnam_cache(); > DEBUG(ret ? 0 : 3,("smb_delete_user: Running the command `%s' gave %d\n",del_script,ret)); > > return ret;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2401
: 1006