Hello Bruno -

You can add an Identifier to the AuthBy LDAP2 clause and then access 
it in the hook with something like this:

        my $authby = Radius::AuthGeneric::find('your_identifier');

then you can use all the internal routines like this:

        my $rc = $authby->.....

hth

Hugh


At 15:56 +0100 28/8/00, Bruno Tiago Rodrigues wrote:
>hi there.
>
>we've been using Radiator for quite a while as a proxy, twiddling
>configurations and getting strange conclusions about smoothly migrating from
>Sun Radius to Radiator.
>we're currently lookingfor  the following behaviour:
>
>
>authentication packets : LDAP  (AuthbyLDAP2.pm) [checking username and
>password ONLY] and some trivial LDAP fields comparisons.
>
>accounting packets : a post_auth hook which basically does all the work
>comparing, tweaking and returning user attributes (usage time and all that
>stuff). post_auth hooks work fine for us, but since we're using LDAP, it
>would be theoretically better to keep an open connection to the LDAP server
>(the same connection used on AuthbyLDAP2.pm would just be perfect! ). The
>problem is... since the connection is part of a structure passed over and
>over, is there any way we can use it inside hooks ? (the same way as we use
>it on AuthbyLDAP2.pm, on the reconnect method, ie: reconnecting if the
>connection was lost or never made or returning the open socket if it
>exists). How can we reach that structure? Is it based on a global variable
>or something ?
>
>suppose we can't reuse the LDAP connection AuthbyLDAP2.pm uses. Can we use a
>startup hook to create a global LDAP connection so it can be used outside
>it, in all post_auth hooks we need to? We've been looking at the code
>examples and having some problems defining a global variable? Would someone
>be kind enough to show us a working example other than the /goodies one
>we've got?
>
>thanks in advance
>
>-Bruno Rodrigues
>
>
>
>===
>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. 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.

Reply via email to