(RADIATOR) rewriting LOG::INFO

Hugh Irvine hugh at open.com.au
Mon May 10 02:04:59 CDT 2004


Hello Shan -

Actually, if you use a PostAuthHook, you can return a reason string 
that will be printed in the reject message.

A pointer to the reason variable is passed as the fourth argument.

     my $p = ${$_[0]};
     my $rp = ${$_[1]};
     my $handled = $_[2];
     my $reason = $_[3];

Then to cause a reject you should set the handled and reason variables 
like this:

	$$handled = $main::REJECT;
	$$reason = 'Authentication rejected due to simultaneous use violation';

I think this should work, so please let me know how you get on.

regards

Hugh


On 8 May 2004, at 18:54, S H A N wrote:

> any tips to alter the Handler.pm ? ;)
>
> S H A N
>
>
> On Sat May 08, 2004 at 07:17:21AM SGT, Hugh Irvine wrote:
>
>>
>> Hello SHAN -
>>
>> It is not possible to avoid the second log message (without altering
>> the Radiator code).
>>
>> regards
>>
>> Hugh
>>
>>
>> On 7 May 2004, at 21:18, S H A N wrote:
>>
>>> hi,
>>> 	i am using the attached hook meant to do Single Session.
>>>
>>> 	if the user tries to do a 2nd concurrent session the hook will
>>> 	reject the login and "MaxSession Exceeded" will be written out in 
>>> logs but
>>> unfortunately in the log the following is being shown up:
>>>
>>> 	-- snippet from logfile --
>>>
>>> 	Fri May  7 18:30:08 2004: INFO: Access rejected for shanali:
>>> MaxSession Exceeded
>>> 	Fri May  7 18:30:08 2004: INFO: Access rejected for shanali:
>>>
>>> 	i would like to find out how to avoid printing in the second
>>> occurrence of INFO message?
>>>
>>> 	thanks & warm regards
>>>
>>> S H A N
>>> <uniqSession.pl>
>>
>> NB: have you included a copy of your configuration file (no secrets),
>> together with a trace 4 debug showing what is happening?
>>
>> -- 
>> Radiator: the most portable, flexible and configurable RADIUS server
>> anywhere. Available on *NIX, *BSD, Windows, MacOS X.
>> -
>> Nets: internetwork inventory and management - graphical, extensible,
>> flexible with hardware, software, platform and database independence.
>> -
>> CATool: Private Certificate Authority for Unix and Unix-like systems.
>>
>> --
>> Archive at http://www.open.com.au/archives/radiator/
>> Announcements on radiator-announce at open.com.au
>> To unsubscribe, email 'majordomo at open.com.au' with
>> 'unsubscribe radiator' in the body of the message.
>
>

NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list