I'm running 2.14.1 on Linux and would like to have PasswordLogFile
also log the reason for auth failures, whether it's a incorrect
password or if the user has failed one of the Check items.
(specificially Simultaneous-Use, but I may add others later)

I've found the bit of code in Handler.pm where the log is written,
but I have no idea where or how to access the variable that contains
the reason for rejection.
Can someone toss me a clue?

        Bill



Here's the code in question..

sub logPassword
{
    my ($self, $user, $submitted_pw, $correct_pw, $result, $p) = @_;

    if (defined $self->{PasswordLogFileName})
    {
        # Dont log for any of the names in ExcludeFromPasswordLog
        return 
            if defined $self->{ExcludeFromPasswordLog}
        && grep {$_ eq $user} @{$self->{ExcludeFromPasswordLog}};

    my $filename = &main::format_special($self->{PasswordLogFileName}, $p);
    my $time = time;
    my $ctime = localtime($time);
    my $r = $result ? 'PASS' : 'FAIL';
    open(LOG, ">>$filename")
        || &main::log($main::LOG_ERR, "Could not open password log file '$filename': 
$!");
    print LOG "$ctime:$time:$user:$submitted_pw:$correct_pw:$r\n";
    close(LOG)
        || &main::log($main::LOG_ERR, "Could not close password log file '$filename': 
$!");
        
    }
}

    



-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]        work --->  http://www.xmission.com/help/
http://scoot.net/   <--- play                                 unf

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to