From 9c7742727a03daa486d77a4ae5f7c4314ced6ad4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 26 Aug 2002 00:43:06 +0000 Subject: Try to support non-root-mode systems without getgrouplist(). Andrew Bartlett (This used to be commit 17096315a0f30f946ddecb79708604a111c37011) --- source3/lib/system_smbd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/system_smbd.c') 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) { -- cgit