You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2003/01/01 04:23:11 UTC

cvs commit: httpd-2.0/modules/aaa mod_authn_dbm.c

nd          2002/12/31 19:23:11

  Modified:    modules/aaa mod_authn_dbm.c
  Log:
  cut password at the first colon.
  This readds the ability to store password and group
  information within the same dbm file
  
  Revision  Changes    Path
  1.9       +6 -0      httpd-2.0/modules/aaa/mod_authn_dbm.c
  
  Index: mod_authn_dbm.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authn_dbm.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_authn_dbm.c	30 Nov 2002 18:48:41 -0000	1.8
  +++ mod_authn_dbm.c	1 Jan 2003 03:23:11 -0000	1.9
  @@ -156,6 +156,7 @@
       apr_datum_t dbm_pw;
       apr_status_t rv;
       char *dbm_password = NULL;
  +    char *colon_pw;
   
       rv = fetch_dbm(conf->dbmtype, conf->pwfile, user, &dbm_pw, r->pool);
   
  @@ -172,6 +173,11 @@
   
       if (!dbm_password) {
           return AUTH_USER_NOT_FOUND;
  +    }
  +
  +    colon_pw = strchr(dbm_password, ':');
  +    if (colon_pw) {
  +        *colon_pw = '\0';
       }
   
       rv = apr_password_validate(password, dbm_password);