Problem setting r->connection->user with new cookie auth module

Problem setting r->connection->user with new cookie auth module

Post by Hans Svensso » Sun, 04 Jan 1998 04:00:00



Hi,

I'm working on an Apache module for authentication using cookies. This
far I have managed to read a cookie and look up a username in a table.
However, setting the r->connection->user to this value doesn't affect
anything. While trying to access a protected directory I get a message
"Document contains no data" and in the log file I see the value of
remote_user is "-". Would anyone familiar with writing authentication
modules like to take a look? Is there some good documentation out there
about the Apache C-API and how it all works?

I've set up a page for my new module at

http://linus.radioaf.com/mysql_cookie_auth_module.html

Best Regards
/Hans

 
 
 

1. How to change a users name (r->connection->user) in a module

Hi,

Am using on the only the "check_access" handler and would like to
change/set the r->connection->user value. I've tried setting it as
follows but does not seem to work.
    char *username = "TestUser";
    r->connection->user = username;

I'am  testing the setting by calling the snoop servlet on tomcat and
checking the Remote User value.

All of the example modules I've seen (including mod_digest, etc) do this
in the "check_auth" handler. So, wondering if one can change the user
name in "check_access" handler. If so, am I missing something?

Help help would be appreciated

Regards,
-Sridhar

2. Backup LV question

3. scoadmin -> Account Manager -> Users -> Add New Users breaks /etc/password symlink

4. ssh, mozilla and resolv.conf catch-22 situation

5. SLIP/PPP -->new kernel-->new compiler-->new make

6. eth2 shouldn't be there?

7. <<<Gateway, gated and setting up new groups....>>>

8. Newbie Terminal Question

9. <><><> MOUNTING EXTENDED PARTITION <><><>

10. Wanted: <><><> Unix Specialist <><><>

11. LILO help <><><><><><>

12. >>---> Software Jobs! >>--->

13. FTP problem: linux>>win/SGI slow win/SGI>>linux fast