]> andersk Git - openssh.git/blobdiff - auth-passwd.c
- (djm) OpenBSD CVS Sync
[openssh.git] / auth-passwd.c
index 62ea3a52dd6227e66f1d9292c9051ff2ff43e749..9a94c373f026c48cec839c040a9d70f6feab346b 100644 (file)
@@ -43,8 +43,8 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.27 2002/05/24 16:45:16 stevesk Exp $");
 #include "servconf.h"
 #include "auth.h"
 
-#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
-/* Don't need any of these headers for the PAM or SIA cases */
+#if !defined(HAVE_OSF_SIA)
+/* Don't need any of these headers for the SIA cases */
 # ifdef HAVE_CRYPT_H
 #  include <crypt.h>
 # endif
@@ -78,7 +78,7 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.27 2002/05/24 16:45:16 stevesk Exp $");
 #  include <sys/cygwin.h>
 #  define is_winnt       (GetVersion() < 0x80000000)
 # endif
-#endif /* !USE_PAM && !HAVE_OSF_SIA */
+#endif /* !HAVE_OSF_SIA */
 
 extern ServerOptions options;
 #ifdef WITH_AIXAUTHENTICATE
@@ -94,7 +94,7 @@ auth_password(Authctxt *authctxt, const char *password)
 {
        struct passwd * pw = authctxt->pw;
        int ok = authctxt->valid;
-#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
+#if !defined(HAVE_OSF_SIA)
        char *encrypted_password;
        char *pw_password;
        char *salt;
@@ -112,7 +112,7 @@ auth_password(Authctxt *authctxt, const char *password)
        int authsuccess;
        int reenter = 1;
 # endif
-#endif /* !defined(USE_PAM) && !defined(HAVE_OSF_SIA) */
+#endif /* !defined(HAVE_OSF_SIA) */
 
        /* deny if no user. */
        if (pw == NULL)
@@ -124,9 +124,7 @@ auth_password(Authctxt *authctxt, const char *password)
        if (*password == '\0' && options.permit_empty_passwd == 0)
                ok = 0;
 
-#if defined(USE_PAM)
-       return auth_pam_password(authctxt, password) && ok;
-#elif defined(HAVE_OSF_SIA)
+#if defined(HAVE_OSF_SIA)
        if (!ok)
                return 0;
        return auth_sia_password(authctxt, password);
@@ -146,22 +144,24 @@ auth_password(Authctxt *authctxt, const char *password)
                HANDLE hToken = cygwin_logon_user(pw, password);
 
                if (hToken == INVALID_HANDLE_VALUE)
-                       return 0;
+                       return (0);
                cygwin_set_impersonation_token(hToken);
-               return 1;
+               return (1);
        }
 # endif
 # ifdef WITH_AIXAUTHENTICATE
        authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
 
-       if (authsuccess)
+       if (authsuccess) {
                /* We don't have a pty yet, so just label the line as "ssh" */
                if (loginsuccess(authctxt->user,
-                       get_canonical_hostname(options.verify_reverse_mapping),
-                       "ssh", &aixloginmsg) < 0)
-                               aixloginmsg = NULL;
+                   get_canonical_hostname(options.use_dns),
+                   "ssh", &aixloginmsg) < 0) {
+                       aixloginmsg = NULL;
+               }
+       }
 
-       return(authsuccess);
+       return (authsuccess);
 # endif
 # ifdef KRB4
        if (options.kerberos_authentication == 1) {
@@ -235,5 +235,5 @@ auth_password(Authctxt *authctxt, const char *password)
 
        /* Authentication is accepted if the encrypted passwords are identical. */
        return (strcmp(encrypted_password, pw_password) == 0);
-#endif /* !USE_PAM && !HAVE_OSF_SIA */
+#endif /* !HAVE_OSF_SIA */
 }
This page took 0.183881 seconds and 4 git commands to generate.