]> andersk Git - openssh.git/blobdiff - auth-passwd.c
- stevesk@cvs.openbsd.org 2002/08/21 19:38:06
[openssh.git] / auth-passwd.c
index 348ab9ddbe23b06fbd7aa209e4ab1b82b28804f6..17bbd2ceba0db51ed7422a2450b662a13a1a1d6e 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-passwd.c,v 1.25 2002/05/06 23:00:59 mouring Exp $");
+RCSID("$OpenBSD: auth-passwd.c,v 1.27 2002/05/24 16:45:16 stevesk Exp $");
 
 #include "packet.h"
 #include "log.h"
@@ -89,16 +89,16 @@ extern ServerOptions options;
 int
 auth_password(Authctxt *authctxt, const char *password)
 {
-       struct passwd * pw = authctxt->pw;
 #if defined(USE_PAM)
-       if (*pw->pw_passwd == '\0' && options.permit_empty_passwd == 0)
+       if (*password == '\0' && options.permit_empty_passwd == 0)
                return 0;
        return auth_pam_password(authctxt, password);
 #elif defined(HAVE_OSF_SIA)
-       if (*pw->pw_passwd == '\0' && options.permit_empty_passwd == 0)
+       if (*password == '\0' && options.permit_empty_passwd == 0)
                return 0;
        return auth_sia_password(authctxt, password);
 #else
+       struct passwd * pw = authctxt->pw;
        char *encrypted_password;
        char *pw_password;
        char *salt;
@@ -124,14 +124,7 @@ auth_password(Authctxt *authctxt, const char *password)
        if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
                return 0;
 #endif
-#ifdef HAVE_CYGWIN
-       /*
-        * Empty password is only possible on NT if the user has _really_
-        * an empty password and authentication is done, though.
-        */
-       if (!is_winnt)
-#endif
-       if (*pw->pw_passwd == '\0' && options.permit_empty_passwd == 0)
+       if (*password == '\0' && options.permit_empty_passwd == 0)
                return 0;
 #ifdef KRB5
        if (options.kerberos_authentication == 1) {
This page took 0.036429 seconds and 4 git commands to generate.