summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-04-23 17:28:28 +0000
committerKevin Steves <stevesk@pobox.com>2001-04-23 17:28:28 +0000
commit5f3b9b9091b8887b28c46eea3ca574f13bb1388a (patch)
tree5256b81c89361cfa680ebb922c53d912102d0369
parentc65e6a0fec9d96722d268003c2b89c2a8906aee9 (diff)
- (stevesk) pam_start() doesn't use DNS now for sshd -u0.
-rw-r--r--ChangeLog3
-rw-r--r--auth-pam.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1680cc0d..f2857a4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
- markus@cvs.openbsd.org 2001/04/22 23:58:36
[ssh-keygen.1 ssh.1 sshd.8]
document hostbased and other cleanup
+ - (stevesk) pam_start() doesn't use DNS now for sshd -u0.
20010422
- OpenBSD CVS Sync
@@ -5231,4 +5232,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1160 2001/04/23 13:02:16 mouring Exp $
+$Id: ChangeLog,v 1.1161 2001/04/23 17:28:28 stevesk Exp $
diff --git a/auth-pam.c b/auth-pam.c
index 8113a2fc..91854a40 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -35,7 +35,7 @@
extern char *__progname;
-RCSID("$Id: auth-pam.c,v 1.35 2001/04/20 17:43:47 stevesk Exp $");
+RCSID("$Id: auth-pam.c,v 1.36 2001/04/23 17:28:29 stevesk Exp $");
#define NEW_AUTHTOK_MSG \
"Warning: Your password has expired, please change it now"
@@ -348,6 +348,8 @@ void start_pam(const char *user)
{
int pam_retval;
extern ServerOptions options;
+ extern u_int utmp_len;
+ const char *rhost;
debug("Starting up PAM with username \"%.200s\"", user);
@@ -357,10 +359,10 @@ void start_pam(const char *user)
fatal("PAM initialisation failed[%d]: %.200s",
pam_retval, PAM_STRERROR(__pamh, pam_retval));
- debug("PAM setting rhost to \"%.200s\"",
- get_canonical_hostname(options.reverse_mapping_check));
- pam_retval = pam_set_item(__pamh, PAM_RHOST,
- get_canonical_hostname(options.reverse_mapping_check));
+ rhost = get_remote_name_or_ip(utmp_len, options.reverse_mapping_check);
+ debug("PAM setting rhost to \"%.200s\"", rhost);
+
+ pam_retval = pam_set_item(__pamh, PAM_RHOST, rhost);
if (pam_retval != PAM_SUCCESS)
fatal("PAM set rhost failed[%d]: %.200s", pam_retval,
PAM_STRERROR(__pamh, pam_retval));