Sorry forgot to make cpass an int

Index: lka.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/lka.c,v
retrieving revision 1.199
diff -u -p -u -r1.199 lka.c
--- lka.c       17 May 2017 14:00:06 -0000      1.199
+++ lka.c       16 Dec 2017 15:07:16 -0000
@@ -453,7 +453,7 @@ static int
 lka_authenticate(const char *tablename, const char *user, const char *password)
 {
        struct table            *table;
-       char                    *cpass;
+       int                     cpass;
        union lookup             lk;

        log_debug("debug: lka: authenticating for %s:%s", tablename, user);
@@ -472,10 +472,10 @@ lka_authenticate(const char *tablename,
        case 0:
                return (LKA_PERMFAIL);
        default:
-               cpass = crypt(password, lk.creds.password);
-               if (cpass == NULL)
+               cpass = crypt_checkpass(password, lk.creds.password);
+               if (cpass < 0)
                        return (LKA_PERMFAIL);
-               if (!strcmp(lk.creds.password, cpass))
+               else
                        return (LKA_OK);
                return (LKA_PERMFAIL);
        }


-- 
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to