summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-03-03 16:52:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:53 -0500
commit140752fd35bd5701b3078abf695f811d933fe893 (patch)
tree1b66bc1d681aff4a5d62bc0647c4dd8683545377 /source3/groupdb
parent85b094801e3dcabc7aa86360371515c5c471027f (diff)
downloadsamba-140752fd35bd5701b3078abf695f811d933fe893.tar.gz
samba-140752fd35bd5701b3078abf695f811d933fe893.tar.bz2
samba-140752fd35bd5701b3078abf695f811d933fe893.zip
r5647: Caches are good for performance, but you get a consistency problem.
Fix bug # 2401. Volker (This used to be commit eb4ef94f244d28fe531d0b9f724a66ed3834b687)
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index 1c29cc77c4..5613240a12 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -1050,6 +1050,7 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user)
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 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user)
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;
}