diff options
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_interface.c | 6 | ||||
-rw-r--r-- | source3/passdb/pdb_ldap.c | 4 | ||||
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 4 | ||||
-rw-r--r-- | source3/passdb/pdb_tdb.c | 4 |
4 files changed, 18 insertions, 0 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index cc05d97468..7252ea4c8c 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -366,6 +366,9 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods, add_ret = smbrun(add_script,NULL); DEBUG(add_ret ? 0 : 3, ("_samr_create_user: Running the command `%s' gave %d\n", add_script, add_ret)); + if (add_ret == 0) { + smb_nscd_flush_user_cache(); + } #ifdef ENABLE_BUILD_FARM_HACKS if (add_ret != 0) { @@ -443,6 +446,9 @@ static int smb_delete_user(const char *unix_user) all_string_sub(del_script, "%u", unix_user, sizeof(del_script)); ret = smbrun(del_script,NULL); flush_pwnam_cache(); + if (ret == 0) { + smb_nscd_flush_user_cache(); + } DEBUG(ret ? 0 : 3,("smb_delete_user: Running the command `%s' gave %d\n",del_script,ret)); return ret; diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index e0f79c140d..0f03a1cc6e 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1870,6 +1870,10 @@ static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods, DEBUG(rc ? 0 : 3,("Running the command `%s' gave %d\n", rename_script, rc)); + if (rc == 0) { + smb_nscd_flush_user_cache(); + } + if (rc) return NT_STATUS_UNSUCCESSFUL; diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 905cf8f2a2..afc00445f4 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1550,6 +1550,10 @@ static NTSTATUS smbpasswd_rename_sam_account (struct pdb_methods *my_methods, DEBUG(rename_ret ? 0 : 3,("Running the command `%s' gave %d\n", rename_script, rename_ret)); + if (rename_ret == 0) { + smb_nscd_flush_user_cache(); + } + if (rename_ret) goto done; } else { diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index b16368baf1..e9beaa0536 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -1461,6 +1461,10 @@ static NTSTATUS tdbsam_rename_sam_account(struct pdb_methods *my_methods, DEBUG(rename_ret ? 0 : 3,("Running the command `%s' gave %d\n", rename_script, rename_ret)); + if (rename_ret == 0) { + smb_nscd_flush_user_cache(); + } + if (rename_ret) { goto done; } |