diff --git a/miniserv.pl b/miniserv.pl index 185f92518..e6112a688 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -927,6 +927,8 @@ $ok_code = 200; $ok_message = "Document follows"; $logged_code = undef; $reqline = $request_uri = $page = undef; +$authuser = undef; +$validated = undef; # check address against access list if (@deny && &ip_match($acptip, $localip, @deny) || @@ -1857,6 +1859,8 @@ if (&get_type($full) eq "internal/cgi") { $baseauthuser : undef; $ENV{"REMOTE_PASS"} = $authpass if (defined($authpass) && $config{'pass_password'}); + print DEBUG "REMOTE_USER = ",$ENV{"REMOTE_USER"},"\n"; + print DEBUG "BASE_REMOTE_USER = ",$ENV{"BASE_REMOTE_USER"},"\n"; $ENV{"SSL_USER"} = $peername if ($validated == 2); $ENV{"ANONYMOUS_USER"} = "1" if ($validated == 3); $ENV{"DOCUMENT_ROOT"} = $roots[0]; @@ -3941,12 +3945,12 @@ return $logout_time_cache{$user,$sid}; sub unix_crypt { -local ($user, $pass) = @_; +local ($pass, $salt) = @_; if ($use_perl_crypt) { - return Crypt::UnixCrypt::crypt($user, $pass); + return Crypt::UnixCrypt::crypt($pass, $salt); } else { - return crypt($user, $pass); + return crypt($pass, $salt); } } diff --git a/pam_login.cgi b/pam_login.cgi index ff99341c6..4dd79faf9 100755 --- a/pam_login.cgi +++ b/pam_login.cgi @@ -4,6 +4,7 @@ $pragma_no_cache = 1; #$ENV{'MINISERV_INTERNAL'} || die "Can only be called by miniserv.pl"; require './web-lib.pl'; +require './ui-lib.pl'; &init_config(); &ReadParse(); if ($gconfig{'loginbanner'} && $ENV{'HTTP_COOKIE'} !~ /banner=1/ && @@ -24,9 +25,8 @@ $sec = uc($ENV{'HTTPS'}) eq 'ON' ? "; secure" : ""; &get_miniserv_config(\%miniserv); print "Set-Cookie: banner=0; path=/$sec\r\n" if ($gconfig{'loginbanner'}); print "Set-Cookie: testing=1; path=/$sec\r\n"; -&header(undef, undef, undef, undef, 1, 1, undef, undef, - "document.forms[0].answer.focus()'"); -print "
\n"; -print "