summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-08-26 00:43:06 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-08-26 00:43:06 +0000
commit9c7742727a03daa486d77a4ae5f7c4314ced6ad4 (patch)
treeb1d301b2b4fa2a8e15aac97592199950627a8a8d /source3/lib
parent014792fc03c9d4030794e4e06fb137cd2ce32b17 (diff)
downloadsamba-9c7742727a03daa486d77a4ae5f7c4314ced6ad4.tar.gz
samba-9c7742727a03daa486d77a4ae5f7c4314ced6ad4.tar.bz2
samba-9c7742727a03daa486d77a4ae5f7c4314ced6ad4.zip
Try to support non-root-mode systems without getgrouplist().
Andrew Bartlett (This used to be commit 17096315a0f30f946ddecb79708604a111c37011)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system_smbd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index 580ef8a463..5eda37d903 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -41,6 +41,11 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, in
gid_t *gids_saved;
int ret, ngrp_saved;
+ if (non_root_mode()) {
+ *grpcnt = 0;
+ return 0;
+ }
+
/* work out how many groups we need to save */
ngrp_saved = getgroups(0, NULL);
if (ngrp_saved == -1) {