diff options
author | Gerald Carter <jerry@samba.org> | 2006-04-02 06:25:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:51 -0500 |
commit | 6c9eaa6880897aabbc56ad3d7bd73dfc69f926f9 (patch) | |
tree | d2c7e1efb628d346284f0777b461e32f54607029 /source3/passdb | |
parent | 872d3cea871264eed0159f49fba8621dd357ef1d (diff) | |
download | samba-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/passdb')
-rw-r--r-- | source3/passdb/pdb_interface.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index bd58dba702..88cf387838 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -1501,16 +1501,20 @@ static BOOL get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, size struct group *grp; char **gr; struct passwd *pwd; + char *winbindd_env; *pp_uids = NULL; *p_num = 0; /* We only look at our own sam, so don't care about imported stuff */ - winbind_off(); + winbindd_env = getenv(WINBINDD_DONT_ENV); + winbind_putenv("0"); if ((grp = getgrgid(gid)) == NULL) { - winbind_on(); + /* allow winbindd lookups */ + winbind_putenv( winbindd_env ? winbindd_env : "1" ); + return False; } @@ -1535,7 +1539,8 @@ static BOOL get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, size add_uid_to_array_unique(mem_ctx, pw->pw_uid, pp_uids, p_num); } - winbind_on(); + /* allow winbindd lookups */ + winbind_putenv( winbindd_env ? winbindd_env : "1" ); return True; } @@ -1595,15 +1600,9 @@ NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods, const char *username = pdb_get_username(user); -#if 0 /* Ignore the primary group SID. Honor the real Unix primary group. The primary group SID is only of real use to Windows clients */ - if (!sid_to_gid(pdb_get_group_sid(user), &gid)) { - DEBUG(10, ("sid_to_gid failed\n")); - return NT_STATUS_NO_SUCH_USER; - } -#else if ( !(pw = getpwnam_alloc(mem_ctx, username)) ) { return NT_STATUS_NO_SUCH_USER; } @@ -1611,7 +1610,6 @@ NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods, gid = pw->pw_gid; TALLOC_FREE( pw ); -#endif if (!getgroups_unix_user(mem_ctx, username, gid, pp_gids, p_num_groups)) { return NT_STATUS_NO_SUCH_USER; |