summaryrefslogtreecommitdiff
path: root/src/daemontools-extras
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-07 00:31:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-07 00:31:01 +0000
commit2da4c96f308834570b2f62bbf3b9e0cfcffe58b8 (patch)
tree38d246f2ab5feef53eb9063c422ababf1ca783b7 /src/daemontools-extras
parentd5191bffe53505187d012a1a000e337cc2bbab01 (diff)
downloads6-2da4c96f308834570b2f62bbf3b9e0cfcffe58b8.tar.xz
Allow empty gidlists in s6-applyuidgid
Diffstat (limited to 'src/daemontools-extras')
-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 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") ;