Allow one supplementary group - actually we should check that this is
authorwerner <werner>
Fri, 6 Dec 2002 18:11:11 +0000 (18:11 +0000)
committerwerner <werner>
Fri, 6 Dec 2002 18:11:11 +0000 (18:11 +0000)
the same as the regular group.

webbsh.c

index 7ce068a..04b20fe 100644 (file)
--- a/webbsh.c
+++ b/webbsh.c
@@ -210,7 +210,8 @@ main (int argc, char **argv)
       exit (1);
     }
 
-  if ( getgroups (0, dummy_grplist) )
+  n = getgroups (0, dummy_grplist);
+  if ( n < 0 || n > 1)
     { 
       fprintf (stderr, "webbsh: user `%s' must not"
                        " have any supplementary groups\n", ACCOUNT);