#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
# 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
{
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;
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)
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);
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) {
/* 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 */
}