[RADIATOR] Log messages for Authby Group

Markus Moeller huaraz at moeller.plus.com
Wed Mar 18 03:26:12 CST 2009


For version 4.2 I was thinking something like:


# diff -c AuthGROUP.pm  AuthGROUP-new.pm
*** AuthGROUP.pm        Wed Mar 18 09:18:42 2009
--- AuthGROUP-new.pm    Wed Mar 18 09:23:13 2009
***************
*** 166,193 ****
--- 166,205 ----
        if ($self->{AuthByPolicy} eq 'ContinueWhileIgnore')
        {
            $stop = ($handled != $main::IGNORE);
+             $self->log($main::LOG_INFO, "AuthBy $handler->{Identifier} returned $Radius::AuthGeneric::reasons[$handled], Reason: $reason", $p)
+                    if (!$stop);
        }
        elsif ($self->{AuthByPolicy} eq 'ContinueUntilIgnore')
        {
            $stop = ($handled == $main::IGNORE);
+             $self->log($main::LOG_INFO, "AuthBy $handler->{Identifier} returned $Radius::AuthGeneric::reasons[$handled], Reason: $reason", $p)
+                    if (!$stop);
        }
        elsif ($self->{AuthByPolicy} eq 'ContinueWhileAccept')
        {
            $stop = ($handled != $main::ACCEPT);
+             $self->log($main::LOG_INFO, "AuthBy $handler->{Identifier} returned $Radius::AuthGeneric::reasons[$handled], Reason: $reason", $p)
+                    if (!$stop);
        }
        elsif ($self->{AuthByPolicy} eq 'ContinueUntilAccept')
        {
            $stop = ($handled == $main::ACCEPT);
+             $self->log($main::LOG_INFO, "AuthBy $handler->{Identifier} returned $Radius::AuthGeneric::reasons[$handled], Reason: $reason", $p)
+                    if (!$stop);
        }
        elsif ($self->{AuthByPolicy} eq 'ContinueWhileReject')
        {
            $stop = ($handled != $main::REJECT 
                     && $handled != $main::REJECT_IMMEDIATE);
+             $self->log($main::LOG_INFO, "AuthBy $handler->{Identifier} returned $Radius::AuthGeneric::reasons[$handled], Reason: $reason", $p)
+                    if (!$stop);
        }
        elsif ($self->{AuthByPolicy} eq 'ContinueUntilReject')
        {
            $stop = ($handled == $main::REJECT
                     || $handled == $main::REJECT_IMMEDIATE);
+             $self->log($main::LOG_INFO, "AuthBy $handler->{Identifier} returned $Radius::AuthGeneric::reasons[$handled], Reason: $reason", $p)
+                    if (!$stop);
        }
        last if $stop;
      }
# 

This will create an Info message if the Authby is not the last.

Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20090318/8916f0e3/attachment.html>


More information about the radiator mailing list