Subject: (usr-tc) Cistron checkrad.pl script

From: [email-masked]
Date: Wed, 20 Oct 1999 03:09:10 +0000

Hello fellow Total Control victems.

My name is Paul... and I own an ARC chassis

<group>

Hi Paul

Anyways...  for everone out there using the most exellent Cistron Radius
1.5.4.3 daemon there is a bit of a problem with the checkrad.pl script
that checks the simeltaneous-use on the ARC vi SNMP.

When the radius acct packet comes in it has the port number prefixed with
an S (S10, S1010) and the code did not strip out that letter before it
built the OID to snmpget from the ARC.

So basically is was never checking the arc to see if they were already
logged in.

So.. in all its glory... I give my fix... cut,paste,enjoy.

sub usrhiper_snmp {

        # Somebody please verify????

        # remove leading S from port #
        $_=$ARGV[2];
        s/S//;
        my($slot) = $_;
        my($oidext) = $slot + 1256;

        my ($login);

        $login = snmpget($ARGV[1], "public", "$usrm.4.10.1.1.18.$oidext");
        print LOG " snmpget info: $login\n" if ($debug);

        #($login) = /^.*\"([^"]+)".*$/;

        print LOG "  user at port [S]$slot: $login\n" if ($debug);

        ($login eq $ARGV[3]) ? 1 : 0;
}

Wait... no warranties, not refunds, send free beer and pizza to the
address below (anything other than Coors light will be proptly returned to
sender).

Paul Farber
Farber Technology
[email-masked]
Ph  570-628-5303
Fax 570-628-5545

-
 To unsubscribe to usr-tc, send an email to "[email-masked]"
 with "unsubscribe usr-tc" in the body of the message.
 For information on digests or retrieving files and old messages send
 "help" to the same address.  Do not use quotes in your message.