Mike wrote:

cation in Apache 2.0 is actually very nicely engineered. If you want to store the username and the password, you can. However, you don't have to.
Thanks for the reply.
The problem is that I need access to this info in the callback function, and the callback does not have access to the request_rec.

For example..

auth_basic_user(){

do_some_stuff(); //Gets the user name and password(password as you suggested) and stores them so that they can be used by later callback. mm_login
call_cclient_to_auth();
return;

}

call_cclient_to_auth() takes no parms and eventually uses callback functions to do things, one of these being to get the user/password to auth with. This is by design of the c-client lib and not something I can change.
PAM is very similar - it uses a callback. However, it also uses a void pointer that gets passed in a setup function earlier. Anything like that available? (e.g. to call it with an r-> or a custom structure with the info?)

Unfortunately not, that was what I had hoped to do originally.

Mike.
Is there a thread-safe form of the library? (that sort of thing will have functions that take parameters if it uses callbacks). Another alternative is to set up another "daemon" process for the authentication mechanism - which may or may not cause the rest of the module to fail depending on what you do.

In other words, you just might have to use a global variable and set up mutex's to prevent multiple instances from calling during the authentication - or else expect the unexpected.

Joe

Reply via email to