3 if (-x '/usr/ucb/groups') {
4 $groups_command = '/usr/ucb/groups';
5 } elsif (-x '/usr/bin/groups') {
6 $groups_command = '/usr/bin/groups';
15 ($pwgnam) = getgrgid($pwgid);
16 @basegroup{$pwgid,$pwgnam} = (1,1);
20 for (split(' ', $()) {
22 ($group) = getgrgid($_);
31 $gr1 = join(' ', sort @gr);
33 $gr2 = join(' ', grep(!$basegroup{$_}++, sort split(' ',`$groups_command`)));
39 print "#gr1 is <$gr1>\n";
40 print "#gr2 is <$gr2>\n";
44 # multiple 0's indicate GROUPSTYPE is currently long but should be short
46 if ($pwgid == 0 || $seen{0} < 2) {
50 print "not ok 2 (groupstype should be type short, not long)\n";