mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-27 01:44:21 +00:00
chroot: always diagnose failure to set supplemental groups
* src/chroot.c (setgroups): Change this replacement to fail when called so that platforms like Interix without support for supplemental groups don't silently ignore a --groups option.
This commit is contained in:
parent
09eda9ed9d
commit
137a423975
@ -54,13 +54,12 @@ static struct option const long_opts[] =
|
||||
};
|
||||
|
||||
#if ! HAVE_SETGROUPS
|
||||
/* At least Interix lacks supplemental group support. Define an
|
||||
always-successful replacement to avoid checking for setgroups
|
||||
availability everywhere, just to support broken platforms. */
|
||||
/* At least Interix lacks supplemental group support. */
|
||||
static int
|
||||
setgroups (size_t size _GL_UNUSED, gid_t const *list _GL_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
errno = ENOTSUP;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user