httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject suggestion: passwd diff (fwd)
Date Fri, 13 Dec 1996 15:02:48 GMT
----- Forwarded message from Adam Nelson -----

From: Adam Nelson <spud@darth.netcon.net.au>
Message-Id: <199612131256.XAA02015@darth.netcon.net.au>
Subject: suggestion: passwd diff
To: apache-bugs@apache.org
Date: Fri, 13 Dec 1996 23:56:47 +1100 (EST)
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Sorry guys, that last diff I sent had a serious bug in it :-( This one works
properly, I've tested it this time (was a little rushed last time). 

Regards, Adam.
___________________________________________________________________________

   _--_|\                                   Adam Nelson, spud@netcon.net.au
  /  Oz  \               System Administrator, Netconnect Bendigo Pty. Ltd.
  \_.--._/                                        Telephone +61 03 54444922
        v                                  http://www.bendigo.net.au/~spud/
___________________________________________________________________________


--- apache_1.2b2/src/mod_auth.c	Wed Dec 11 23:21:58 1996
+++ mod_auth.new	Wed Dec 11 23:25:31 1996
@@ -172,7 +172,7 @@
     conn_rec *c = r->connection;
     char *sent_pw, *real_pw;
     char errstr[MAX_STRING_LEN];
-    int res;
+    int res, count;
     
     if ((res = get_basic_auth_pw (r, &sent_pw))) return res;
     
@@ -185,6 +185,13 @@
 	note_basic_auth_failure (r);
 	return AUTH_REQUIRED;
     }
+
+	/* Ensure there's nothing after the password field, as in standard
+	   /etc/passwd format. Remove it if there is.
+	                                          Adam Nelson, spud@netcon.net.au */
+	for(count = 0; real_pw[count] != ':' && real_pw[count] != '\0'; count++) ;
+	real_pw[count] = '\0';
+
     /* anyone know where the prototype for crypt is? */
     if(strcmp(real_pw,(char *)crypt(sent_pw,real_pw))) {
         sprintf(errstr,"user %s: password mismatch",c->user);

----- End of forwarded message from Adam Nelson -----

-- 
Rob Hartill.       Internet Movie Database Ltd.    http://www.imdb.com/  

Mime
View raw message