5 @INC = "../lib" if -d "../lib";
6 eval { require Config; import Config; };
8 my $PW = "/etc/passwd";
10 if ($Config{'i_pwd'} ne 'define' or not -f $PW or not open(PW, $PW)
11 # NeXTstep /etc/passwd is used only at boot time,
12 # after that it's up to NetInfo and NIS/YP.
22 # Go through at most this many users.
35 my ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s;
36 @n = getpwuid($uid_s);
39 my ($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$home,$shell) = @n;
40 # Protect against one-to-many and many-to-one mappings.
41 if ($name_s ne $name) {
42 @n = getpwnam($name_s);
43 ($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$home,$shell) = @n;
44 next if $name_s ne $name;
47 if $name ne $name_s or
48 # Shadow passwords confuse this.
49 # Think about non-crypt(3) encryptions, too, before you do anything rash.
50 # $passwd ne $passwd_s or
61 print "ok ", $tst++, "\n";