5 @INC = "../lib" if -d "../lib";
6 eval { require Config; import Config; };
10 if (($^O eq 'next' and not open(GR, "nidump group .|"))
11 or (defined $Config{'i_grp'} and $Config{'i_grp'} ne 'define')
12 or not -f $GR or not open(GR, $GR)
21 # Go through at most this many groups.
34 my ($name_s,$passwd_s,$gid_s,$members_s) = @s;
35 $members_s =~ s/\s*,\s*/,/g;
36 $members_s =~ s/\s+$//;
37 $members_s =~ s/^\s+//;
38 @n = getgrgid($gid_s);
41 my ($name,$passwd,$gid,$members) = @n;
42 # Protect against one-to-many and many-to-one mappings.
43 if ($name_s ne $name) {
44 @n = getgrnam($name_s);
45 ($name,$passwd,$gid,$members) = @n;
46 next if $name_s ne $name;
48 $members =~ s/\s+/,/g;
50 if $name ne $name_s or
51 # Shadow passwords confuse this.
52 # Not that group passwords are used much but still.
53 # $passwd ne $passwd_s or
55 $members ne $members_s;
61 print "ok ", $tst++, "\n";