summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-05-05 01:12:45 +0000
committergreen <green@FreeBSD.org>2001-05-05 01:12:45 +0000
commit094816f4b21a5b8bb280bf0d43fada4a9d1c0c5c (patch)
tree9f9f7847bccaaf3b7e6bb26086cdbcf82b867498 /crypto
parentb48e2b1dc26b8ed5eefa8412ae1efc92d53c6247 (diff)
downloadFreeBSD-src-094816f4b21a5b8bb280bf0d43fada4a9d1c0c5c.zip
FreeBSD-src-094816f4b21a5b8bb280bf0d43fada4a9d1c0c5c.tar.gz
Finish committing _more_ somehow-uncommitted OpenSSH 2.9 updates.
(Missing Delta Brigade, tally-ho!)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/auth-pam.c13
-rw-r--r--crypto/openssh/auth-pam.h3
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 <security/pam_appl.h>
#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 <pwd.h> /* 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);
OpenPOWER on IntegriCloud