From 2da4c96f308834570b2f62bbf3b9e0cfcffe58b8 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 7 Jan 2015 00:31:01 +0000 Subject: Allow empty gidlists in s6-applyuidgid --- src/daemontools-extras/s6-applyuidgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/daemontools-extras') diff --git a/src/daemontools-extras/s6-applyuidgid.c b/src/daemontools-extras/s6-applyuidgid.c index ec6d824..31dc198 100644 --- a/src/daemontools-extras/s6-applyuidgid.c +++ b/src/daemontools-extras/s6-applyuidgid.c @@ -34,7 +34,7 @@ int main (int argc, char const *const *argv, char const *const *envp) case 'z' : unexport = 1 ; break ; case 'u' : if (!uint0_scan(l.arg, &uid)) dieusage() ; break ; case 'g' : if (!uint0_scan(l.arg, &gid)) dieusage() ; break ; - case 'G' : if (!gid_scanlist(gids, NGROUPS_MAX, l.arg, &gidn)) dieusage() ; break ; + case 'G' : if (!gid_scanlist(gids, NGROUPS_MAX, l.arg, &gidn) && *l.arg) dieusage() ; break ; case 'U' : { char const *x = env_get2(envp, "UID") ; -- cgit v1.2.3