summaryrefslogtreecommitdiff
path: root/auth-pam.c
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 /auth-pam.c
parentc65e6a0fec9d96722d268003c2b89c2a8906aee9 (diff)
- (stevesk) pam_start() doesn't use DNS now for sshd -u0.
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 8113a2fc0..91854a400 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -35,7 +35,7 @@
35 35
36extern char *__progname; 36extern char *__progname;
37 37
38RCSID("$Id: auth-pam.c,v 1.35 2001/04/20 17:43:47 stevesk Exp $"); 38RCSID("$Id: auth-pam.c,v 1.36 2001/04/23 17:28:29 stevesk Exp $");
39 39
40#define NEW_AUTHTOK_MSG \ 40#define NEW_AUTHTOK_MSG \
41 "Warning: Your password has expired, please change it now" 41 "Warning: Your password has expired, please change it now"
@@ -348,6 +348,8 @@ void start_pam(const char *user)
348{ 348{
349 int pam_retval; 349 int pam_retval;
350 extern ServerOptions options; 350 extern ServerOptions options;
351 extern u_int utmp_len;
352 const char *rhost;
351 353
352 debug("Starting up PAM with username \"%.200s\"", user); 354 debug("Starting up PAM with username \"%.200s\"", user);
353 355
@@ -357,10 +359,10 @@ void start_pam(const char *user)
357 fatal("PAM initialisation failed[%d]: %.200s", 359 fatal("PAM initialisation failed[%d]: %.200s",
358 pam_retval, PAM_STRERROR(__pamh, pam_retval)); 360 pam_retval, PAM_STRERROR(__pamh, pam_retval));
359 361
360 debug("PAM setting rhost to \"%.200s\"", 362 rhost = get_remote_name_or_ip(utmp_len, options.reverse_mapping_check);
361 get_canonical_hostname(options.reverse_mapping_check)); 363 debug("PAM setting rhost to \"%.200s\"", rhost);
362 pam_retval = pam_set_item(__pamh, PAM_RHOST, 364
363 get_canonical_hostname(options.reverse_mapping_check)); 365 pam_retval = pam_set_item(__pamh, PAM_RHOST, rhost);
364 if (pam_retval != PAM_SUCCESS) 366 if (pam_retval != PAM_SUCCESS)
365 fatal("PAM set rhost failed[%d]: %.200s", pam_retval, 367 fatal("PAM set rhost failed[%d]: %.200s", pam_retval,
366 PAM_STRERROR(__pamh, pam_retval)); 368 PAM_STRERROR(__pamh, pam_retval));