Hello Dave, Hello Simon -
I have copied this to Mike for his comments, however from my own experience
you are far better off reading the source in any case. Mike's programming
style and copious comments make this a real pleasure.
Simon -
My suggestion would also be to use a PostAuthHook, and I see you have done
that. I put together some sample hooks that illustrate some of the things you
can do in hooks in the file "goodies/hooks.txt" in the distribution. Note
that there have been some additional hooks added recently in Radiator 2.18
(and also a couple in the patches).
BTW - AddToReply will add attributes to a reject in an AuthBy clause.
May the source be with you!
regards
Hugh
On Thursday 19 April 2001 02:20, Kitabjian, Dave wrote:
> Actually, I'd love to see the whole(?) API which is available to us in
> Hooks documented in an appendix to the venerable "manual" :) A few are
> mentioned throughout already, like get_attr(). But for most you have to
> look through the source.
>
> Dave
>
> :O
> :
> > -----Original Message-----
> > From: Simon Hackett [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 18, 2001 11:12 AM
> > To: [EMAIL PROTECTED]
> > Subject: (RADIATOR) Re: Returning avpairs with a an Access-Reject?
> >
> >
> > To follow up my own posting... I found one way that works, a
> > PostAuthHook:
> >
> > # drop an h323 return code of 1 (auth failed) into the reply if it is
> > # an access reject or reject_immediate - SWH hack for debitcard script
> >
> > PostAuthHook sub { ${$_[1]}->add_attr('cisco-h323-return-code', \
> > 'h323-return-code=1') \
> > if (${$_[2]}
> > == $main::REJECT) \
> >
> > || (${$_[2]} ==
> >
> > $main::REJECT_IMMEDIATE)}
> >
> > Which gets the job done, but I don't see why attributes generated as
> > part of a reject shouldn't wind up in the return packet. Maybe it's
> > how I'm rejecting the user (a DEFAULT entry in a users file which
> > says 'Auth-Type = Reject')?
> >
> > Also, as a comment about the docs (Hi Mike), the example PostAuthHook
> > in the manual (which the above is a shameless copy/adaptation of)
> > doesn't mention that the REJECT code might be REJECT_IMMEDIATE, not
> > just plain old REJECT. That had me fooled for a while! :)
> >
> > Perhaps the docs could make a reference in that section to a complete
> > list of possible values of x for $main::x ...
> >
> > Cheers,
> > Simon
> >
> > ---
> > Simon Hackett, Technical Director, Internode Systems Pty Ltd
> > 31 York St [PO Box 284, Rundle Mall], Adelaide, SA 5000 Australia
> > Email: [EMAIL PROTECTED] Web: http://www.on.net
> > Phone: +61-8-8223-2999 Fax: +61-8-8223-1777
> >
> >
> > ===
> > 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.
>
> ===
> 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.
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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.