httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-1.3/src/lib/sdbm sdbm.h
Date Sun, 25 Feb 2001 23:34:44 GMT
We've actually been talking about this one on the mod_dav mailing list (a
user of mod_dav 1.0 was trying to use Perl to examine the property files).

Similar to mod_ssl, I changed the "geometry" (great word) of the files to
allow for larger properties. (I dunno what mod_ssl stores in there, but Ralf
increased the size, too). This was the right solution, and I wasn't worried
about Perl compatibility.

sdbm was added to Apache 1.3 by OtherBill so that mod_auth_dbm could be used
on Windows (sdbm is *not* built into the non-Windows Apache 1.3 builds, and
I think it should stay that way). Since it is only used for passwords, it is
fine for it to have the same geometry as Perl. There isn't a need for larger
records. And mod_dav 1.0 will always use its bundled copy.

For Apache 2.0, we have a different story. My first reaction is to say,
"hell yah: make the settings the same as Perl. If a DAV user wants larger
properties, apr_dbm makes it *real* easy for them to switch to gdbm or db3
or *anything* that is much more flexible." But then I pause... mod_dav 1.0
users' property files will be incompatible.

I believe the right answer for Apache 2.0 is twofold:

1) align the SDBM geometry with Perl
2) mod_dav 1.0 will grow a tool to dump prop dbs in a neutral format; Apache
   2.0 can import this neutral format into an apr_dbm database (whichever
   form is selected)
   [ mod_dav 1.0 is going to have a new release in the next month, so this
     works fine; the dump/load tools are a variant of apr-util/tests/testdbm
     which has been suggested as a rename to apr-util/tools/something ]

Does that approach seem reasonable?

Cheers,
-g

On Sun, Feb 25, 2001 at 04:40:10PM -0600, William A. Rowe, Jr. wrote:
> This patch must be brought over to 2.0 --- however I half expect it to entirely
> break DAV.  Greg or some other DAV folk, could you comment?
> 
> The patch made sdbm compatible with sdbm.  We can either get this right or someone
> can implement dbmmanage in c.  That still leaves Apache:: perl package users with
> a terribly broken dbm user file mechanism.
> 
> > wrowe       01/01/24 11:29:26
> > 
> >   Modified:    src      CHANGES
> >                src/lib/sdbm sdbm.h
> >   Log:
> >     Sync sdbm.h with Perl for Win32 mod_auth_dbm.  Note that this makes the
> >     bundled sdbm incompatible with DAV's large dbm record requirements.
> >   
> >   Revision  Changes    Path
> >   1.1625    +5 -0      apache-1.3/src/CHANGES
> >   
> >   Index: CHANGES
> >   ===================================================================
> >   RCS file: /home/cvs/apache-1.3/src/CHANGES,v
> >   retrieving revision 1.1624
> >   retrieving revision 1.1625
> >   diff -u -r1.1624 -r1.1625
> >   --- CHANGES 2001/01/24 16:54:07 1.1624
> >   +++ CHANGES 2001/01/24 19:29:22 1.1625
> >   @@ -1,5 +1,10 @@
> >    Changes with Apache 1.3.17
> >    
> >   +  *) Fixed the sdbm.h bundled in Apache for Win32, bringing it in sync
> >   +     with Perl.  Because it didn't have the same geometry as Perl, 
> >   +     users reported the first user added with dbmmanage was not 
> >   +     recognized.  [William Rowe]
> >   +
> >      *) Fixed ap_os_canonical_filename to append a the default volume 
> >         name if the the path is a full path and does not include the
> >         volume name.  Since NetWare's current working directory always 
> >   
> >   
> >   
> >   1.2       +5 -7      apache-1.3/src/lib/sdbm/sdbm.h
> >   
> >   Index: sdbm.h
> >   ===================================================================
> >   RCS file: /home/cvs/apache-1.3/src/lib/sdbm/sdbm.h,v
> >   retrieving revision 1.1
> >   retrieving revision 1.2
> >   diff -u -r1.1 -r1.2
> >   --- sdbm.h 2000/09/21 13:06:14 1.1
> >   +++ sdbm.h 2001/01/24 19:29:25 1.2
> >   @@ -4,16 +4,14 @@
> >     * author: oz@nexus.yorku.ca
> >     * status: public domain. 
> >     */
> >   -/* increase the block/page size and what can be inserted */
> >   -#if 1
> >   -#define DBLKSIZ 16384
> >   -#define PBLKSIZ 8192
> >   -#define PAIRMAX 8008 /* arbitrary on PBLKSIZ-N */
> >   -#else
> >   +
> >   +/* These settings are -incompatible- with mod_dav [www.webdav.org/mod_dav/]
> >   + * but are required for compatibility with mod_auth_dbm.  Do not link this 
> >   + * build of sdbm into mod_dav and expect success, dav requires big records.
> >   + */
> >    #define DBLKSIZ 4096
> >    #define PBLKSIZ 1024
> >    #define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */
> >   -#endif
> >    #define SPLTMAX 10 /* maximum allowed splits */
> >    /* for a single insertion */
> >    #define DIRFEXT ".dir"
> >   
> >   
> >   
> > 

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message