--- loncom/lond 2001/08/30 20:02:28 1.51 +++ loncom/lond 2001/09/30 18:32:31 1.52 @@ -16,6 +16,7 @@ # 03/24 Gerd Kortemeyer # 04/02 Scott Harrison # 05/11,05/28,08/30 Gerd Kortemeyer +# 9/30 Scott Harrison # # based on "Perl Cookbook" ISBN 1-56592-243-3 # preforker - server who forks first @@ -471,8 +472,18 @@ sub make_new_child { (crypt($upass,$contentpwd) eq $contentpwd); } elsif ($howpwd eq 'unix') { $contentpwd=(getpwnam($uname))[1]; - $pwdcorrect= - (crypt($upass,$contentpwd) eq $contentpwd); + my $pwauth_path="/usr/local/sbin/pwauth"; + unless ($contentpwd eq 'x') { + $pwdcorrect= + (crypt($upass,$contentpwd) eq $contentpwd); + } + elsif (-e $pwauth_path) { + open PWAUTH, "|$pwauth_path" or + die "Cannot invoke authentication"; + print PWAUTH "$uname\n$upass\n"; + close PWAUTH; + $pwdcorrect=!$?; + } } elsif ($howpwd eq 'krb4') { $pwdcorrect=( Authen::Krb4::get_pw_in_tkt($uname,"",