Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83957 - pwauth-2.3.1 does not work with mod_auth_external
Summary: pwauth-2.3.1 does not work with mod_auth_external
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
: 132876 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-03 07:32 UTC by Miroslaw Poray-Zbrozek
Modified: 2006-06-05 12:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslaw Poray-Zbrozek 2005-03-03 07:32:17 UTC
I discovered this bug while testing the new Apache configuration files scheme. I emerged net-www/apache-2.0.52-r3 first, moved the configuration files to their new locations and then I started to reemerge the additional modules I need. After emerging mod_auth_external and pwauth (which used to be a part of the former in older releases but now is a separate package), editing the configuration files and restarting Apache I discovered that authorization always fails even if the credentials submitted are correct.

Reproducible: Always
Steps to Reproduce:
1. emerge mod_auth_external
2. emerge pwauth
3. Add -D AUTH_EXTERNAL to /etc/conf.d/apache
4. Edit /etc/apache2/modules.d/10_mod_auth_external.conf so that the paths and references to /usr/sbin/pwauth are correct
5. Start Apache
6. Send a request for a password protected page from a web browser
7. Submit a valid user name and password.
Actual Results:  
I could not log into any location where mod_auth_external was used even though
the credentials submitted were correct.

Expected Results:  
The server should have accepted the credentials and sent the requested page to
the browser.

I tested the pwauth program as root from the command line. It seemed to work
correcetly. This can be done by invoking /usr/sbin/pwauth typing-in username and
password and then checking the result by: echo $?. If you get 0 that means that
the login was succesful.

Then I switched to a regular user account and repeated the tests. It turned out
that the program did not work any more. The error code it returned was 50. I
looked into the sources to find out what it was. I found out that uid=72 was
hard coded into the config.h file (only this uid and root can run the program,
anyone elese will get error code 50) while my apache user has 81. Editing line
#241 in this file so that it reads:

#define SERVER_UIDS 81          /* user "apache" */

recompiling the program and replacing /usr/sbin/pwauth makes it work again.
Comment 1 Benedikt Böhm (RETIRED) gentoo-dev 2005-03-03 10:18:36 UTC
pwauth-2.3.1-r1 in cvs
Comment 2 Benedikt Böhm (RETIRED) gentoo-dev 2006-06-05 12:18:18 UTC
*** Bug 132876 has been marked as a duplicate of this bug. ***