httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@remulak.net>
Subject Re: bugdb userdatabase
Date Tue, 05 Feb 2002 21:14:21 GMT
Jeff Trawick wrote:
> 
> Greg Ames <gregames@remulak.net> writes:

> > >
> > > > stat("/home/apmail/bugdbaccounts.db",0xbfbff2f8) ERR#2 'No such file or
> > > > directory'
> > > > open("/home/apmail/bugdbaccounts.db",0,0664)     ERR#2 'No such file or
> > > > directory'
> >
> > OK, I wonder if something is wrong with AuthDBMType processing, and we're
> > invoking the wrong DB open or some such?  Is there a db manager that does append
> > .db?
> 
> How do we get to BerkeleyDB code?
> 
> [trawick@daedalus trawick]$ file /home/apmail/bugdbaccounts
> /home/apmail/bugdbaccounts: Berkeley DB 1.85 (Hash, version 2, native
> byte-order)
> [trawick@daedalus trawick]$

Looking in mod_auth_dbm.c, apparently AP_AUTH_DBM_USE_APR isn't defined because
the log message doesn't have the "(type %s)", so we are doing dbm_open() and
that fails.  Should AP_AUTH_DBM_USE_APR be defined when mod_auth_dbm is compiled
on Unix?  If so, how?

Greg
----------------------------------------------------------------------------------------
#ifdef AP_AUTH_DBM_USE_APR
    retval  = apr_dbm_open_ex(&f, dbtype, auth_dbmpwfile, APR_DBM_READONLY,
                              APR_OS_DEFAULT, r->pool);
    if (retval != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, retval, r,
                      "could not open dbm (type %s) auth file: %s", dbtype,
                      auth_dbmpwfile);
        return NULL;
    }
    if (apr_dbm_fetch(f, q, &d) == APR_SUCCESS)
        /* sorry for the obscurity ... falls through to the
         * if (d.dptr) {  block ...
         */
 
#else
    if (!(f = dbm_open(auth_dbmpwfile, O_RDONLY, 0664))) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
            "could not open dbm auth file: %s", auth_dbmpwfile);
        return NULL;
    }
    d = dbm_fetch(f, q);
 
#endif

Mime
View raw message