Hello

I have tried this but it doesn't work.

Thanks

Here is my source code ( Swap Phone and Login to authenticate on phone +
password )

use Radius::Radius;
use strict;
sub
{
        my $p = ${$_[0]};
        my $code = $p->code;
        my $subcodetype =
$p->getAttrByNum($Radius::Radius::ACCT_STATUS_TYPE);
        my $username;
        my $msisdn;
        if ( $code eq 'Access-Request')
        {
                my $username = $p->getAttrByNum($Radius::Radius::USER_NAME);
                my $msisdn =
$p->getAttrByNum($Radius::Radius::CALLING_STATION_ID);
                if (!$msisdn)
                {
                        $msisdn="000000000";
                }
                $p->{CachedAttrs}{$Radius::Radius::USER_NAME} = $msisdn;
                $p->changeAttrByNum($Radius::Radius::USER_NAME, $msisdn);

                $p->{CachedAttrs}{$Radius::Radius::CALLING_STATION_ID} =
$username;
                $p->changeAttrByNum($Radius::Radius::CALLING_STATION_ID,
$username);
                my $logfile;
                foreach $logfile ($p->{Handler}->{AcctLogFileName})
                {
                        # Only do this to check the filename
                        print $logfile;
                        print "\n-----------\n";
                }
        }
}


And now my config File

# radius.cfg
LogDir /var/log/radius
DbDir /usr/local/etc/radiator
LogStdout
Trace 4
PidFile %L/radiusd.pid
AuthPort 1645
AcctPort 1646
LogFile %L/radius.log
DictionaryFile /usr/local/etc/radiator/dictionary

PreClientHook file:"/usr/local/etc/radiator/accessldap.pl"

<Client localhost>
        Secret xxxxxx
        DupInterval 0
        FramedGroupBaseAddress 10.1.0.1
          IdenticalClients 192.168.10.20 192.168.202.61 192.168.20.15
        #NasType Cisco
</Client>

<Client 192.168.10.20>
        Secret mysecret
        DupInterval 0
        FramedGroupBaseAddress 10.1.0.1
        #NasType Cisco
</Client>

<Realm DEFAULT>
        AcctLogFileName %L/%m-%Y-detail
        PostAuthHook file:"/usr/local/etc/radiator/checkstate.pl"
        <AuthBy LDAP2>
                Host            192.168.20.30
                Port            389
                AuthDN          cn=Directory Manager
                AuthPassword    password
                BaseDN          o=servicesusers
                UsernameAttr    wapUserMsisdn
                PasswordAttr    wapUserPassword
        </AuthBy>
</Realm>
-----Original Message-----
From: EXT Hugh Irvine [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 01, 1999 8:14 AM
To: Requiem Aurelien (Ext/NTC)
Cc: [EMAIL PROTECTED]
Subject: RE: (RADIATOR) AccountingLogFile



Hello Requiem -

Here is a copy of my response to this question last week.

Hugh

On Thu, 26 Aug 1999, Requiem Aurelien (Ext/NTC) wrote:
> >%_Hello
> 
> I know about SQL logging
> but i must use a file accounting file to add informations
> So i just need actually to retrieve the correct file for
> the accouting logfile
> I've got a preclienthook function that works fine
> and i have added those lines
> my $p = ${$_[0]};
> my logfilename = ($p->{AcctLogFilename});
> but i have't got any filename. So just tell me how please
> 

$p is a pointer to the current radius packet (which does not contain
AcctLogFilename), so you will need to do this:

$p->{Handler}->{AcctLogFilename}

hth

Hugh

--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody

application/ms-tnef

Reply via email to