From 6c9eaa6880897aabbc56ad3d7bd73dfc69f926f9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 2 Apr 2006 06:25:11 +0000 Subject: r14855: Various fixes: * depreacte 'acl group control' after discussion with Jeremy and implement functionality as part of 'dos filemode' * fix winbindd on a non-member server to expand local groups * prevent code previously only used by smbd from blindly turning _NO_WINBINDD back on (This used to be commit 4ab372f4cab22225716b5c9a9a08f0c1dbc9928d) --- source3/lib/system_smbd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c index c627ae6270..ac7a096295 100644 --- a/source3/lib/system_smbd.c +++ b/source3/lib/system_smbd.c @@ -120,14 +120,19 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) { int retval; + char *winbindd_env; DEBUG(10,("sys_getgrouplist: user [%s]\n", user)); + + /* Save the winbindd state and not just blindly turn it back on */ + + winbindd_env = getenv(WINBINDD_DONT_ENV); /* This is only ever called for Unix users, remote memberships are * always determined by the info3 coming back from auth3 or the * PAC. */ - if ( !winbind_off() ) { + if ( !winbind_putenv("0") ) { DEBUG(0,("sys_getgroup_list: Insufficient environment space " "for %s\n", WINBINDD_DONT_ENV)); } else { @@ -144,7 +149,8 @@ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grp #endif /* allow winbindd lookups */ - winbind_on(); + + winbind_putenv( winbindd_env ? winbindd_env : "1" ); return retval; } -- cgit