httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aram Mirzadeh <...@luers.qosina.com>
Subject Re: DBM User Auth. (Apache/Linux) Help! (fwd)
Date Fri, 07 Mar 1997 03:14:32 GMT

Not really true... some linux packages come with a link from ndbm to gdbm,
if gdbm is installed. 

If you really want to make it universal then we need to check for gdbm in 
the OS stuff, and just assign it there to have ndbm vs gdbm.

I'll make a patch if intersted? 

<Aram>

Rob Hartill said:
> 
> 
> I think we should support this via a #define 
> 
> ---------- Forwarded message ----------
> Date: 05 Mar 1997 10:59:36 -0500
> From: "Todd R. Eigenschink" <eigenstr@pluto.mixi.net>
> Newsgroups: comp.infosystems.www.servers.unix
> Subject: Re: DBM User Auth. (Apache/Linux) Help!
> 
> <snip>
> 
> But the mods to make mod_auth_dbm.c use GDBM are trivial--a whopping 4
> lines.  A diff is attached.  I've been using this as long as I've been
> using DBM-style password files, which has been since 1.1.1 was hot
> stuff. :-)
> 
> <snip>
> 
> --- mod_auth_dbm.c.orig	Sun Jan 19 23:28:11 1997
> +++ mod_auth_dbm.c	Mon Feb 24 08:31:55 1997
> @@ -69,7 +69,7 @@
>  #include "http_core.h"
>  #include "http_log.h"
>  #include "http_protocol.h"
> -#include <ndbm.h>
> +#include <gdbm.h>
>  
>  typedef struct  {
>  
> @@ -121,19 +121,19 @@
>  module dbm_auth_module;
>  
>  char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile) {
> -    DBM *f; 
> +    GDBM_FILE f; 
>      datum d, q; 
>      char *pw = NULL;
>  
>      q.dptr = user; 
>      q.dsize = strlen(q.dptr); 
>      
> -    if(!(f=dbm_open(auth_dbmpwfile,O_RDONLY,0664))) {
> +    if(!(f=gdbm_open(auth_dbmpwfile,0,GDBM_READER,0664,0))) {
>          log_reason ("could not open dbm auth file", auth_dbmpwfile, r);
>  	return NULL;
>      }
>  
> -    d = dbm_fetch(f, q);
> +    d = gdbm_fetch(f, q);
>  
>      if (d.dptr) {
>          pw = palloc (r->pool, d.dsize + 1);
> @@ -141,7 +141,7 @@
>  	pw[d.dsize] = '\0';         /* Terminate the string */
>      }
>  
> -    dbm_close(f);
> +    gdbm_close(f);
>      return pw; 
>  }
>  
> 
> 
> -- 
> Todd R. Eigenschink		Midwest Internet Exchange, Inc.
> eigenstr@mixi.net		http://www.mixi.net/
> System Administrator		(219) 459-2521
> 
> 
> 
> 


-- 

  What is comedy?  Comedy is the art of making people laugh without making
  them puke.
                -- Steve Martin

Aram Mirzadeh				     Apache httpd team member		
awm@qosina.com				     awm@apache.org
http://www.qosina.com/~awm/		     http://www.apache.org
	    PGP Key http://www.qosina.com/~awm/pgpkey.html
           BE 49 9D F6 2A A7 22 FC  02 E9 1E 3D F7 0C 67 A0

Mime
View raw message