[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Still one change in zpwmatch



You may not have a user in shadow but still have it in passwd
(or by replacement getpw*()), to make things work I'd suggest this
small change:

--- smtpserver/zpwmatch.c.orig  Wed Sep  8 11:23:04 1999
+++ smtpserver/zpwmatch.c       Wed Sep  8 11:48:04 1999
@@ -192,7 +192,6 @@
 
     runastrusteduser();
 
-    if (!spw) goto final_out; /* No such user */
     pw = getpwnam(uname);
     if (!pw) goto final_out; /*No such user! HUH! (had shadow-entry, though!
*/
 
@@ -206,7 +205,7 @@
     cr = crypt(password, pw->pw_passwd);
     if (strcmp(cr, pw->pw_passwd) == 0)
       ok = 1;
-    else {
+    else if (spw) {
       /* Ok, perhaps the second one contains usable encrypted password ? */
       cr = crypt(password, spw->sp_pwdp);
       if (strcmp(cr, spw->sp_pwdp) == 0)

Eugene