summaryrefslogtreecommitdiff
path: root/source3/lib/system_smbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/system_smbd.c')
-rw-r--r--source3/lib/system_smbd.c3
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) {