*/
#include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.39 2002/03/19 14:27:39 markus Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.41 2002/06/19 00:27:55 deraadt Exp $");
#include "xmalloc.h"
#include "rsa.h"
#if defined(KRB4) || defined(KRB5)
(!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
#endif
-#ifdef USE_PAM
- auth_pam_password(pw, "")) {
-#elif defined(HAVE_OSF_SIA)
- 0) {
-#else
PRIVSEP(auth_password(authctxt, ""))) {
-#endif
auth_log(authctxt, 1, "without authentication", "");
return;
}
if (bits != BN_num_bits(client_host_key->rsa->n))
verbose("Warning: keysize mismatch for client_host_key: "
"actual %d, announced %d",
- BN_num_bits(client_host_key->rsa->n), bits);
+ BN_num_bits(client_host_key->rsa->n), bits);
packet_check_eom();
authenticated = auth_rhosts_rsa(pw, client_user,
password = packet_get_string(&dlen);
packet_check_eom();
-#ifdef USE_PAM
- /* Do PAM auth with password */
- authenticated = auth_pam_password(pw, password);
-#elif defined(HAVE_OSF_SIA)
- /* Do SIA auth with password */
- authenticated = auth_sia_password(authctxt->user,
- password);
/* Try authentication with the password. */
authenticated = PRIVSEP(auth_password(authctxt, password));
-#endif /* USE_PAM */
memset(password, 0, strlen(password));
xfree(password);
authenticated = 0;
#endif
#ifdef USE_PAM
- if (authenticated && !do_pam_account(pw->pw_name, client_user))
+ if (!use_privsep && authenticated &&
+ !do_pam_account(pw->pw_name, client_user))
authenticated = 0;
#endif
return;
if (authctxt->failures++ > AUTH_FAIL_MAX) {
-#ifdef WITH_AIXAUTHENTICATE
- loginfailed(authctxt->user,
- get_canonical_hostname(options.verify_reverse_mapping),
- "ssh");
-#endif /* WITH_AIXAUTHENTICATE */
packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
}
{
Authctxt *authctxt;
u_int ulen;
- char *p, *user, *style = NULL;
+ char *user, *style = NULL;
/* Get the name of the user that we wish to log in as. */
packet_read_expect(SSH_CMSG_USER);
if ((style = strchr(user, ':')) != NULL)
*style++ = '\0';
+#ifdef KRB5
/* XXX - SSH.com Kerberos v5 braindeath. */
- if ((p = strchr(user, '@')) != NULL)
- *p = '\0';
+ if ((datafellows & SSH_BUG_K5USER) &&
+ options.kerberos_authentication) {
+ char *p;
+ if ((p = strchr(user, '@')) != NULL)
+ *p = '\0';
+ }
+#endif
authctxt = authctxt_new();
authctxt->user = user;
use_privsep ? " [net]" : "");
#ifdef USE_PAM
- start_pam(pw == NULL ? "NOUSER" : user);
+ PRIVSEP(start_pam(authctxt->pw == NULL ? "NOUSER" : user));
#endif
/*