Salut Christophe -

At 20:16 +0100 01/1/22, Christophe Wolfhugel wrote:
>This is just a philosophical question...
>
>My wish is to be able to do this for my LDAP frontends :
>
><Handler>
>       PreProcessingHook       sub { ## set Base1 and Base2 bases on %R }
>       RewriteUsername         s/\@.+$//
>       <AuthBy LDAP2>
>               Host            myldapserver
>               AuthDN          p=mydn,t=o
>               AuthPassword    mypassword
>               BaseDN          c=%{GlobalVar:Base1},c=%{GlobalVar:Base2},t=b
>               ...
>       </AuthBy>
></Handler>
>

Well, there are two philosophical questions to be answered in what 
you show above. Firstly, I would not be setting Base1 and Base2 as 
GlobalVar's in a PreProcessingHook. GlobalVar's are really meant for 
static variables, to be initialised once at run time, they also won't 
work correctly as you show above when Radiator does finally use 
multi-threading. Secondly, BaseDN is initialised at run time too, so 
special-character replacement won't work there either.

The better answer to both your questions is to have the 
PreProcessingHook add Base1 and Base2 as pseudo-attributes to the 
request packet ($p), and then use the SearchFilter construct to build 
your LDAP query with the special characters %{Base1} and %{Base2}.

hth

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.

Reply via email to