(RADIATOR) radiator hooks

PREVOSTO, Laurent laurent.prevosto at neuf.com
Thu Jun 9 11:00:41 CDT 2005


Hi, 

All this makes me wondering :
Is there a way to retrieve, inside of a hook, the name of the AuthBy clause that triggered it, something like $p->{AuthBy}->{Identifier} ?

Regards

laurent

> -----Message d'origine-----
> De : owner-radiator at open.com.au [mailto:owner-radiator at open.com.au] De la
> part de Jason Stechschulte
> Envoyé : vendredi 3 juin 2005 01:30
> À : radiator at open.com.au
> Objet : (RADIATOR) radiator hooks
> 
> We are getting ready to a sputnik control center system on our network,
> and as a result of this, I need to be able to update a user's
> information when an Acct-Status-Type = Stop is received.  Which of the
> hooks should I use to accomplish this?
> 
> I have tried preauth and postauth.  They seem to run when a stop record
> is sent, but I can't get any useful information.  I have even tried
> using excerpts from th examples with no luck.  Right now I have this as
> a PostAuthHook:
> 
> sub {
>    my $p = ${$_[0]};
>    my $rp = ${$_[1]};
>    my $result = ${$_[2]};
> 
>    my $identifier;
> 
>    if (($result == $main::ACCEPT) && ($identifier = $p->{Client}-
> >{Identifier})) {
>       &main::log($main::LOG_DEBUG, "Jason's Client Identifier =
> $identifier");
>    }
> 
>    return;
> }
> 
> 
> This snippet came for the goodies/hooks.txt file.  I'm not seeing
> anything enter the log file even though I have trace set to 5.  Is there
> something specific I need to set to be able to write to logs within the
> hook?
> 
> Instead of having it log, I have tried to just get it to write to a file
> in the /tmp dir.  When I do this, It simply writes:
> 
> Jason's Client Identifier =
> 
> And $identifier is always blank.  I have it simply append to the file so
> I can see every time it is ran what the results are, and I'm always
> unsuccessful at filling $identifier.
> 
> I'm hoping this is just something simple I'm overlooking.  By the way
> are there any docs that cover writing hooks for radiator?  The only
> thing I have found besides the goodies/hooks.txt file is this:
> 
> http://www.open.com.au/radiator/ref.html#pgfId=319543
> 
> The examples in goodies/hooks.txt I can't seem to get working and the
> information at the page above doesn't really explain what variables are
> available.  Just wondering if there is somewhere that it explains it a
> little more in depth.
> 
> --
> Jason Stechschulte
> Network Administrator
> West Central Ohio Internet Link
> Lima, OH USA
> 
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list