Hello Petri -

On Wed, 22 Nov 2000, Petri Maenpaa wrote:
> Hi,
> 
> Is there a way to access Radiator session count for the user
> in postauthhook? I use the default internal session database
> and looking into code reveals that SessINTERNAL.pm at least
> internally keeps SessionCount.
> 

Sure.

# configure session database

<SessionDatabase INTERNAL>
        Identifier SDB-Internal
</SessionDatabase>

<Realm ....>
        SessionDatabase INTERNAL
        ....
        PostAuthHook file:"%D/Check-SDB-Internal
</Realm>


# PostAuthHook Check-SDB-Internal

sub 
{
    my $p = ${$_[0]};
    my $rp = ${$_[1]};
    my $result = ${$_[2]};

    my $sdb =  Radius::SessGeneric::find('SDB-Internal');

    if ($result == $main::ACCEPT)
    {
    ......
    
Have a look at the examples in the file "goodies/hooks.txt"

regards

Hugh
                     
-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.



===
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