diff options
author | Jeremy Allison <jra@samba.org> | 2012-06-28 11:59:51 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-06-28 17:15:16 -0700 |
commit | 821bd95156e8cc6d843aecb0a27d4a08761b7dac (patch) | |
tree | a35f1f0059005555bc3fe548760a9cf01e896d55 /source3/lib/system_smbd.c | |
parent | 7630fe50bd7d0783d1f6b253cbee46cccca3f774 (diff) | |
download | samba-821bd95156e8cc6d843aecb0a27d4a08761b7dac.tar.gz samba-821bd95156e8cc6d843aecb0a27d4a08761b7dac.tar.bz2 samba-821bd95156e8cc6d843aecb0a27d4a08761b7dac.zip |
Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.
Will allow thread-specific credentials to be added by modifying
the central definitions. Deliberately left the setXX[ug]id()
call in popt as this is not used in Samba.
Diffstat (limited to 'source3/lib/system_smbd.c')
-rw-r--r-- | source3/lib/system_smbd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c index 634f88ea9c..10d7f38d52 100644 --- a/source3/lib/system_smbd.c +++ b/source3/lib/system_smbd.c @@ -26,6 +26,7 @@ #include "includes.h" #include "system/passwd.h" #include "nsswitch/winbind_client.h" +#include "../lib/util/setid.h" #ifndef HAVE_GETGROUPLIST @@ -130,7 +131,7 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, return from getgroups() */ save_re_gid(); set_effective_gid(gid); - setgid(gid); + samba_setgid(gid); num_gids = getgroups(0, NULL); if (num_gids == -1) { |