www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Nottingham <m...@pobox.com>
Subject mod_auth-any/2040: with auth_db, if -ldb is linked, apache cannot find DEFAULT_USER or see User directives
Date Tue, 07 Apr 1998 07:22:29 GMT

>Number:         2040
>Category:       mod_auth-any
>Synopsis:       with auth_db, if -ldb is linked, apache cannot find DEFAULT_USER  or see
User directives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Apr  7 00:30:01 PDT 1998
>Originator:     mnot@pobox.com
>Release:        1.2.6
BSD/OS 2.0.1 BSDI on a 486/66
compiled with gcc 2.6.3
bsddb is 1.8.6
the box does not do dynamic linking, I think.

compiling with standard modules + mod_auth_db, mod_expires, mod_headers,
mod_status. Both with and without -ldb in EXTRA_LIBS.
If I compile in mod_auth_db and specify -ldb in EXTRA_LIBS, 
./httpd -d /path/to/server/root will give "httpd: bad user name nobody". 
There is a valid nobody user on the system (without a shell, tho). Specifying
the preferred user in conf.h does not help; i.e, you'll get 
httpd: "bad user name www".

If I don't include -ldb in EXTRA_LIBS, the server will run, but authentication 
will fail, giving 
access to /path/to/auth/db/users.db failed for host, reason: could not open db auth file
access to /url/to/protected/document failed for host, reason: DB user foo not found

perms for the db and all parent directories permit the www user to read. The
actual databases are generated by the same db libaries as I'm attempting to 
link apache to.

The db libraries work fine for other purposes; their test suite completes without
err, see above.
This is my best guess:
It seems that perhaps linking in the berkeley db libaries is blocking the ability
to lookup users from the system, but that doesn't seem quite right, as I assume
that would be done through a system call. When it can't lookup the default user
(as per conf.h), it dies, never getting to the User directive.

I've tried compiling with DEFAULT_USER as the numeric UID; no luck.
The only other possibility is if I've totally missed something as far as paths
or file access, but I've triple-checked...

Unfortunately, I can't use mod_auth_dbm, as the databases will eventually be
generated on another box, with a different byte-ordering.

[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]

View raw message