I tried the PreAuthHook, but I've got a problem
Details from the config file:
-----------------------------
<Realm DEFAULT>
PreAuthHook file:"/d1/rad/data/hook1.pl"
<AuthBy SQL>
....
</AuthBy>
</Realm>
The Perl test file:
-------------------
#!/usr/local/bin/perl
#
use DBI;
use strict;
sub{
$dsn = "DBI:mysql:radius";
my $dbh = DBI->connect($dsn,"xxxx","xxxxx") || die "DB open error";
$sth = $dbh->prepare("update SUBSCRIBERS set MINUTES=MINUTES-1 where
USERNAME='jim'");
$sth->execute;
$sth->finish;
$dbh->disconnect();
}
When I tried to run the script from the command line, it decremented the
MINUTES column by 1. When I used the radpwtst utility, it decremented by 3, I think the
script has run 3 times.
Can someone tell me what's wrong ?
SJ.
===
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.