httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: [REWRITE] htpasswd+htdbm+dbmmange
Date Tue, 06 Nov 2001 16:30:01 GMT
From: "Mladen Turk" <mturk@mappingsoft.com>
Sent: Friday, October 12, 2001 2:15 PM


> Hi,
> 
> Some rewrite and some new stuffs.
> 
> 1. htpasswd.c
> a) uses the same command line options as old one
> b) the default is MD5 on all platforms
> c) has tree new options: list, delete and verify(check)

I'd commented on this once before, it was too major of an overhaul to follow
in cvs versioning.  I didn't (don't) see the need for such an extensive rewrite.

> 2. htdbm.c
> a) same syntax as htpasswd but manages DBM databases
> b) has additional option for comments
> 
> 3. dbmmange.c
> a) replaces in a way the dbmmanage.pl
> b) uses the apr-util's DBM

I think you've convinced me to go with ht- syntax.  Rethinking, if we continue
to distribute dbmmanage (fixing the which-dbm problem within the build system)
then htdbm makes most sense.  dbmmanage remains a good (?) or at least adaquate
example of how to manipulate dbm user files from perl.  As long, of course, as 
the user can still use the same import/export text format, a new command line
syntax no longer bothers me much, if the flags are predictable.

Some things that I either didn't care for in htdbm.c, or quite grok...

  1. changes to stdout?  I don't get it.  If we must, let's use file name '-' as
     many unix utilities do.

  2. -r makes more sense for remove (-d being taken already.)

  3. the code is rather, well, dirty, from the perspective that we overload this
     htdbm.c with all of the trappings of an extension library.  I'm absolutly -1
     on this approach.  If you want to create an ap_htdbm.c library, and link it
     to htdbm.c (using that api) then fine.

  4. you forgot such bits as initializing apr, the pool, etc.  I'm already experimenting,

     and happy to clean those up (such as using apr_getopt, etc, to shrink the code, using
     a single char*username rather than the int gave_username approach, etc.)
     
  5. groups and comments are an essential part of dbm management (and a key attraction)
     for many users.  Again, I'm happy to round that out.

  6. I'd compliment -l(ist) (export) with an import.

So rethinking, dbmmanage.pl still has all the old syntax, and introducing a good (solid)
module that mirrors the htpasswd/htdigest in 2.0 makes much sense.  I'm proceeding on a 
'standalone' .c file based on your work, and we can split that into a library + utility 
after the details are fleshed out (including export/import.)  Please offer your further
thoughts before I posit this to the list/cvs.

Bill



Mime
View raw message