Hello Mark -
At 15:42 +0000 6/12/00, Mark O'Leary wrote:
>Hi,
>
>Is it possible for a PostAuthHook to identify which of multiple AuthBy
>methods in a realm have triggered it?
Actually, the PostAuthHook fires after *all* of the AuthBy clauses
have been executed, so no there is no easy way to do what you
describe.
>I have a ContinueWhileReject realm with Authbys of FILE, then LDAP, then
>RADIUS. What I'd like to do is have a postauthhook subroutine react only to
>successful LDAP authentications...
>
>The hook itself writes the user details into the file consulted by the AuthBy
>File - i.e. it is effectively a cache of successful LDAP lookups. Obviously I
>don't want the hook triggered by a success against the initial cache file
>lookup (!), nor do I want successful proxy RADIUS authentications written to
>the cache.
>
>Any hints/help? All I can think of at the moment is transferring the hook
>code directly into the LDAP module itself, which I'd rather not do since I'd
>like to be able to turn off the cacheing easily (i.e. by commenting out the
>postauthhook line of the cfg and restarting).
>
I think your last idea is the best - roll some code into the LDAP
module. However, I would use as an example the code that is in the
new version of the AuthRADIUS.pm module for caching radius replies.
Then I would set up a USR1HOOK and a USR2HOOK to change the caching
on the fly.
Download Radiator 2.17.1 which is where you will find all the code
and the new hook support.
regards
Hugh
--
NB: I am travelling this week, so there may be delays in our correspondence.
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
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.