commit 2da4c96f308834570b2f62bbf3b9e0cfcffe58b8
parent d5191bffe53505187d012a1a000e337cc2bbab01
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Wed, 7 Jan 2015 00:31:01 +0000
Allow empty gidlists in s6-applyuidgid
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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") ;