From 3f199e43b69230ef9ea58ac51a4dab524f1c83f4 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 16 Jul 2017 16:59:34 +0000 Subject: More secure s6-applyuidgid on systems with a broken setgroups() (thanks muh) --- src/daemontools-extras/s6-applyuidgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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") ; -- cgit v1.2.3