httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject [PATCH] htdbm "verify password" field separator
Date Thu, 23 Jun 2005 20:29:35 GMT
One character fix to the verify password function to split the value
(pw hash:group:comment) field in the DBM by the same field separator
used when we stored it

(Separator fixed from semicolon to colon in revision 101946)

Index: support/htdbm.c
===================================================================
--- support/htdbm.c	(revision 199711)
+++ support/htdbm.c	(working copy)
@@ -226,7 +226,7 @@
     if (apr_dbm_fetch(htdbm->dbm, key, &val) != APR_SUCCESS)
         return APR_ENOENT;
     rec = apr_pstrndup(htdbm->pool, val.dptr, val.dsize);
-    cmnt = strchr(rec, ';');
+    cmnt = strchr(rec, ':');
     if (cmnt)
         strncpy(pwd, rec, cmnt - rec);
     else

testcase: 
support/htdbm -ctb ~/dbm myuser mypass "a comment"
support/htdbm -vb  ~/dbm myuser mypass 

-- 
Eric Covener
covener@gmail.com

Mime
View raw message