[RADIATOR] Accessing Timestamp in Postauthhook during Access-Request
Chris Bland
chris at fdu.edu
Thu Feb 18 15:23:11 CST 2010
Hi guys,
I have what seems like it should be trivial but has been driving me nuts
for more than a day. I wrote a postauthhook to categorize users within
a realm and create log entries in separate database tables. Everything
works find except for getting the Timestamp. My code includes the
following:
my $p = ${$_[0]};
my $rp = ${$_[1]};
my $result = ${$_[2]};
my $reason = ${$_[3]};
my $timestamp = $p->get_attr('Timestamp');
then I execute the following sql statement
insert into $authlog (TIME_STAMP,USERNAME,TYPE,REASON) values
('$timestamp','$username',$reqtype,'$reason')";
When I look in my db logs I see
insert into iauthlog (TIME_STAMP,USERNAME,TYPE,REASON) values
('','chris at fdu.edu',1,'')
My table is constructed like this
+------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| USERNAME | varchar(50) | YES | | NULL | |
| TIME_STAMP | varchar(50) | YES | | NULL | |
| TYPE | int(1) | YES | | NULL | |
| REASON | varchar(50) | YES | | NULL | |
| IPADD | varchar(20) | YES | | NULL | |
+------------+-------------+------+-----+---------+-------+
I keep losing the Timestamp. I have tried to pull time from both the
reply packet as well as the current request but neither works. We are
running version Radiator-3.14-1 on a RHEL4 server.
Any help is appreciated,
-Chris
More information about the radiator
mailing list