Hello Hugh,

  Thanks, I found it in mail archive.

  You said, what ReplyHook must be used, and I get a parts of code from
  AuthLogFILE.pm, Handler.pm, and compose this little sub :)

  If use it as:

       <AuthBy RADIUS>
          Host xx.xx.xx.xx
          Secret mysecret
          ReplyHook file:"%D/AuthLogging"
        </AuthBy>

  it's work like AuthLog module.

AuthLogging:
============
sub
{
    my $rp = ${$_[1]};  # reply packet to NAS
    my $op = ${$_[2]};  # original request packet

    my $SuccessFormat = '%l:%U:%P:OK';
    my $FailureFormat = '%l:%U:%P:FAIL';
    my $FilenameF = '%L/password.log';

    my $filename = &Radius::Util::format_special($FilenameF, $op, $rp);
    my $str = "";
    my $code = $p->code;

    if ( $code eq 'Access-Accept' )
    {
        $str = &Radius::Util::format_special($SuccessFormat, $op, $rp);

    } elsif ( $code eq 'Access-Reject' )
    {
        $str = &Radius::Util::format_special($FailureFormat, $op, $rp);

    } else {
        return;
    }

    open IO, ">>$filename" or do {
        &main::log($main::LOG_ERROR, "AuthLogFILE can't write to $filename: $!\n
        return;
    };

    print IO "$str\n";

    close IO;

}
  

Friday, February 09, 2001, 11:55:51 PM, you wrote:


HI> Hello Rustam -

HI> On Friday 09 February 2001 21:50, Rustam Povarov wrote:
>> Hello,
>>
>>    I try to install "radius-proxy" for solving some problem
>>    with user passwords.
>>    All working properly, exclude logging authentification requests.
>>
>>    Following piece of config file:
>>
>>    ...
>> LogDir /usr/local/radiator/log
>>    ...
>> <AuthLog FILE>
>>         Identifier authlogger
>>         Filename %L/password.log
>>         LogSuccess 1
>>         LogFailure 1
>> </AuthLog>
>>    ...
>> <Handler>
>>         AuthLog authlogger
>>         <AuthBy RADIUS>
>>           Host xx.xx.xx.xx
>>           Secret mysecret
>>           LocalAddress yy.yy.yy.yy
>>         </AuthBy>
>>         AcctLogFileName %L/detail
>> </Handler>
>>     ...
>>
>>    All auth and accounting requests passed successfully, but there is
>>    no 'password.log' in my LogDir. All permissions ok, detail file,
>>    and logfile writes successfully, no any error or warning messages
>>    in logfile (Trace 4). Where is can be problem?
>>

HI> This is because the AuthBy RADIUS does not do any password checking, so no 
HI> password.log will be written.

HI> hth

HI> Hugh




-- 
Best regards,
 Rustam                            mailto:[EMAIL PROTECTED]



===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to