>Number: 708
>Category: mod_auth-any
>Synopsis: DBM autorization not working.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Mon Jun 9 15:50:01 1997
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: apache_1.2b10
>Environment:
Linux 2.0.30 gcc v 2.7.2
>Description:
this is the .htaccess file:
AuthName Members area
AuthType Basic
AuthDBMUserFile /home/httpd/users
<Limit GET POST>
require valid-user
</Limit>
this is the DBM file:
[EMAIL PROTECTED] httpd]$ ls -l
total 30430
drwxrwsr-x 2 root www 1024 Jun 9 12:15 conf
drwxrwsr-x 5 paramoun www 1024 Jun 9 12:27 htdocs
drwxrwsr-x 2 root www 1024 May 30 13:05 logs
-rw-rw-r-- 1 root www 12305 Jun 9 15:20 users
there is an entry in the access file:
[EMAIL PROTECTED] httpd]# /usr/sbin/dbmmanage.new /home/httpd/users view
mike = 19tL4VmM4Wym2
[EMAIL PROTECTED] httpd]#
This is the error log:
[Mon Jun 9 15:21:04 1997] access to /home/httpd/users failed
for me.foo.com, reason: could not open dbm auth file
[Mon Jun 9 15:21:04 1997] access to /home/httpd/htdocs//members
failed for me.foo.com, reason: DBM user mike not found
I have mod_auth_dbm compiled in, with the -lgdbm flag,
it does not give me any grief at compile time.
This is the symbols from my httpd binary
[EMAIL PROTECTED] httpd]# nm bin/httpd | grep dbm
0806b670 T create_dbm_auth_dir_config
0807c424 D dbm_auth_cmds
0807c4b4 D dbm_auth_module
0806b820 T dbm_authenticate_basic_user
0806b950 T dbm_check_auth
U dbm_close
U dbm_fetch
U dbm_open
0806b7b0 T get_dbm_grp
0806b6f0 T get_dbm_pw
0806b6a0 T set_dbm_slot
I have tried
AuthDBMUserFile /home/httpd/users.db
in the .htaccess file.
I have tried EVERYTHING on this. Here is the offending code:
char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile) {
DBM *f;
datum d, q;
char *pw = NULL;
q.dptr = user;
q.dsize = strlen(q.dptr);
if(!(f=dbm_open(auth_dbmpwfile,O_RDONLY,0664))) {
log_reason ("could not open dbm auth file", auth_dbmpwfile, r);
return NULL;
}
It would be nice if I knew WHY it could not open the dbm auth file :|
>How-To-Repeat:
I am not sure how to repeat it on another machine. I have seen quite a few
related posts, but no real solution.
>Fix:
n
>Audit-Trail:
>Unformatted: