[RADIATOR] Request rejecting from within PostSearchHook

Heikki Vatiainen hvn at open.com.au
Tue May 31 07:09:08 CDT 2011


On 05/31/2011 11:34 AM, W.Siebert at t-systems.com wrote:

> It's possible to reject the request from within the PostSearchHook.
>  
> I have tried the following:
>  
> $_[2]->{RadiusResult} = $main::REJECT;
>  
> and
>  
> $_[5]->set_code('Access-Reject');
>  
> but none of them seems to work.

You could add an attribute (real or made up) to request with one value
and to User object's check items with another value.

# Add to request
$_[2]->add_attr('x-failure-reason', 'success');

# Add to User object's check items
$_[3]->get_check->add_attr('x-failure-reason', 'rejected by
PostSearchHook');


Radiator will then notice that check attribute x-failure-reason did not
match and rejects the message.

-- 
Heikki Vatiainen <hvn at open.com.au>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.


More information about the radiator mailing list