summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-04-12 20:14:19 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-04-12 20:14:19 +0000
commit2e16cd4302d6881963c29f7d28209da8a4a226ea (patch)
treef5403d6536e8e92436f5be15574fe708c5604c65 /src
parente26a29be004c763c90a2cd6f6b58cc2a5bdbd253 (diff)
downloadcoreutils-2e16cd4302d6881963c29f7d28209da8a4a226ea.tar.xz
(main) [! HAVE_SETGROUPS]: Don't call setgroups.
Diffstat (limited to 'src')
-rw-r--r--src/setuidgid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/setuidgid.c b/src/setuidgid.c
index e1c8edfb2..3a51225dc 100644
--- a/src/setuidgid.c
+++ b/src/setuidgid.c
@@ -1,5 +1,5 @@
/* setuidgid - run a command with the UID and GID of a specified user
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -104,8 +104,10 @@ main (int argc, char **argv)
error (SETUIDGID_FAILURE, errno,
_("unknown user-ID: %s"), quote (user_id));
+#if HAVE_SETGROUPS
if (setgroups (1, &pwd->pw_gid))
error (SETUIDGID_FAILURE, errno, _("cannot set supplemental group"));
+#endif
if (setgid (pwd->pw_gid))
error (SETUIDGID_FAILURE, errno,