summaryrefslogtreecommitdiff
path: root/source3/lib/system_smbd.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-04-02 06:25:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:51 -0500
commit6c9eaa6880897aabbc56ad3d7bd73dfc69f926f9 (patch)
treed2c7e1efb628d346284f0777b461e32f54607029 /source3/lib/system_smbd.c
parent872d3cea871264eed0159f49fba8621dd357ef1d (diff)
downloadsamba-6c9eaa6880897aabbc56ad3d7bd73dfc69f926f9.tar.gz
samba-6c9eaa6880897aabbc56ad3d7bd73dfc69f926f9.tar.bz2
samba-6c9eaa6880897aabbc56ad3d7bd73dfc69f926f9.zip
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)
Diffstat (limited to 'source3/lib/system_smbd.c')
-rw-r--r--source3/lib/system_smbd.c10
1 files changed, 8 insertions, 2 deletions
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;
}