From 094816f4b21a5b8bb280bf0d43fada4a9d1c0c5c Mon Sep 17 00:00:00 2001 From: green Date: Sat, 5 May 2001 01:12:45 +0000 Subject: Finish committing _more_ somehow-uncommitted OpenSSH 2.9 updates. (Missing Delta Brigade, tally-ho!) --- crypto/openssh/auth-pam.c | 13 +++++++++---- crypto/openssh/auth-pam.h | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/crypto/openssh/auth-pam.c b/crypto/openssh/auth-pam.c index e7403cc..7a5c930 100644 --- a/crypto/openssh/auth-pam.c +++ b/crypto/openssh/auth-pam.c @@ -28,7 +28,10 @@ #include #include "ssh.h" #include "xmalloc.h" +#include "log.h" #include "servconf.h" +#include "readpass.h" +#include "canohost.h" RCSID("$FreeBSD$"); @@ -52,6 +55,7 @@ static struct pam_conv conv = { static pam_handle_t *pamh = NULL; static const char *pampasswd = NULL; static char *pam_msg = NULL; +extern ServerOptions options; /* states for pamconv() */ typedef enum { INITIAL_LOGIN, OTHER } pamstates; @@ -162,9 +166,9 @@ void pam_cleanup_proc(void *context) } /* Attempt password authentation using PAM */ -int auth_pam_password(struct passwd *pw, const char *password) +int auth_pam_password(Authctxt *authctxt, const char *password) { - extern ServerOptions options; + struct passwd *pw = authctxt->pw; int pam_retval; /* deny if no user. */ @@ -195,9 +199,10 @@ int do_pam_account(char *username, char *remote_user) { int pam_retval; - debug("PAM setting rhost to \"%.200s\"", get_canonical_hostname()); + debug("PAM setting rhost to \"%.200s\"", + get_canonical_hostname(options.reverse_mapping_check)); pam_retval = pam_set_item(pamh, PAM_RHOST, - get_canonical_hostname()); + get_canonical_hostname(options.reverse_mapping_check)); if (pam_retval != PAM_SUCCESS) { fatal("PAM set rhost failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); diff --git a/crypto/openssh/auth-pam.h b/crypto/openssh/auth-pam.h index 194f7e8..f1128b8 100644 --- a/crypto/openssh/auth-pam.h +++ b/crypto/openssh/auth-pam.h @@ -8,11 +8,12 @@ #include "includes.h" #ifdef USE_PAM +#include "auth.h" #include /* For struct passwd */ void start_pam(struct passwd *pw); void finish_pam(void); -int auth_pam_password(struct passwd *pw, const char *password); +int auth_pam_password(Authctxt *authctxt, const char *password); char **fetch_pam_environment(void); int do_pam_account(char *username, char *remote_user); void do_pam_session(char *username, const char *ttyname); -- cgit v1.1