(RADIATOR) radiator hooks

Hugh Irvine hugh at open.com.au
Thu Jun 9 20:18:44 CDT 2005


Salut Laurent -

Not all AuthBy clauses support hooks inside them, and the other hooks  
are called either before all the AuthBy clauses are called, or after  
all the AuthBy clauses are called. Note that you could use the  
"AddToRequest" parameter to add whatever you wish to a request packet  
as it traverses an AuthBy clause. I have used this approach in the  
past with great success.

What exactly are you wanting to do?

hope that helps

regards

Hugh


On 10 Jun 2005, at 02:00, PREVOSTO, Laurent wrote:

> 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.
>


NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/ 
radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.


--
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