summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-16 16:59:34 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-16 16:59:34 +0000
commit3f199e43b69230ef9ea58ac51a4dab524f1c83f4 (patch)
tree3bdd0441d91949d03251ad7ed79c10e916a454fb /src
parentebb6b00bf66828c5a2587dd2cd44f8810e01e00b (diff)
downloads6-3f199e43b69230ef9ea58ac51a4dab524f1c83f4.tar.xz
More secure s6-applyuidgid on systems with a broken setgroups() (thanks muh)
Diffstat (limited to 'src')
-rw-r--r--src/daemontools-extras/s6-applyuidgid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemontools-extras/s6-applyuidgid.c b/src/daemontools-extras/s6-applyuidgid.c
index 9264f52..a6e33d3 100644
--- a/src/daemontools-extras/s6-applyuidgid.c
+++ b/src/daemontools-extras/s6-applyuidgid.c
@@ -54,7 +54,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
}
if (!argc) dieusage() ;
- if (gidn != (size_t)-1 && skalibs_setgroups(gidn, gids) < 0)
+ if (gidn != (size_t)-1 && setgroups_and_gid(gid ? gid : getegid(), gidn, gids) < 0)
strerr_diefu1sys(111, "set supplementary group list") ;
if (gid && setgid(gid) < 0)
strerr_diefu1sys(111, "setgid") ;