diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | auth-pam.c | 17 |
2 files changed, 12 insertions, 9 deletions
@@ -102,6 +102,8 @@ | |||
102 | - (bal) sftp-sever.c '%8lld' to '%8llu' (OpenBSD Sync) | 102 | - (bal) sftp-sever.c '%8lld' to '%8llu' (OpenBSD Sync) |
103 | - (bal) uuencode.c resync w/ OpenBSD tree, plus whitespace. | 103 | - (bal) uuencode.c resync w/ OpenBSD tree, plus whitespace. |
104 | - (bal) A bit more whitespace cleanup | 104 | - (bal) A bit more whitespace cleanup |
105 | - (djm) Set PAM_RHOST earlier, patch from Andrew Bartlett | ||
106 | <abartlet@pcug.org.au> | ||
105 | 107 | ||
106 | 20010210 | 108 | 20010210 |
107 | - (djm) Sync sftp and scp stuff from OpenBSD: | 109 | - (djm) Sync sftp and scp stuff from OpenBSD: |
@@ -3885,4 +3887,4 @@ | |||
3885 | - Wrote replacements for strlcpy and mkdtemp | 3887 | - Wrote replacements for strlcpy and mkdtemp |
3886 | - Released 1.0pre1 | 3888 | - Released 1.0pre1 |
3887 | 3889 | ||
3888 | $Id: ChangeLog,v 1.739 2001/02/11 00:00:24 mouring Exp $ | 3890 | $Id: ChangeLog,v 1.740 2001/02/11 11:35:11 djm Exp $ |
diff --git a/auth-pam.c b/auth-pam.c index e6fddecc0..4b2347292 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "canohost.h" | 33 | #include "canohost.h" |
34 | #include "readpass.h" | 34 | #include "readpass.h" |
35 | 35 | ||
36 | RCSID("$Id: auth-pam.c,v 1.25 2001/02/07 01:58:34 djm Exp $"); | 36 | RCSID("$Id: auth-pam.c,v 1.26 2001/02/11 11:35:12 djm Exp $"); |
37 | 37 | ||
38 | #define NEW_AUTHTOK_MSG \ | 38 | #define NEW_AUTHTOK_MSG \ |
39 | "Warning: Your password has expired, please change it now" | 39 | "Warning: Your password has expired, please change it now" |
@@ -228,13 +228,6 @@ int do_pam_account(char *username, char *remote_user) | |||
228 | 228 | ||
229 | pam_set_conv(&conv); | 229 | pam_set_conv(&conv); |
230 | 230 | ||
231 | debug("PAM setting rhost to \"%.200s\"", | ||
232 | get_canonical_hostname(options.reverse_mapping_check)); | ||
233 | pam_retval = pam_set_item(pamh, PAM_RHOST, | ||
234 | get_canonical_hostname(options.reverse_mapping_check)); | ||
235 | if (pam_retval != PAM_SUCCESS) | ||
236 | fatal("PAM set rhost failed[%d]: %.200s", pam_retval, | ||
237 | PAM_STRERROR(pamh, pam_retval)); | ||
238 | if (remote_user) { | 231 | if (remote_user) { |
239 | debug("PAM setting ruser to \"%.200s\"", remote_user); | 232 | debug("PAM setting ruser to \"%.200s\"", remote_user); |
240 | pam_retval = pam_set_item(pamh, PAM_RUSER, remote_user); | 233 | pam_retval = pam_set_item(pamh, PAM_RUSER, remote_user); |
@@ -347,6 +340,14 @@ void start_pam(const char *user) | |||
347 | if (pam_retval != PAM_SUCCESS) | 340 | if (pam_retval != PAM_SUCCESS) |
348 | fatal("PAM initialisation failed[%d]: %.200s", | 341 | fatal("PAM initialisation failed[%d]: %.200s", |
349 | pam_retval, PAM_STRERROR(pamh, pam_retval)); | 342 | pam_retval, PAM_STRERROR(pamh, pam_retval)); |
343 | |||
344 | debug("PAM setting rhost to \"%.200s\"", | ||
345 | get_canonical_hostname(options.reverse_mapping_check)); | ||
346 | pam_retval = pam_set_item(pamh, PAM_RHOST, | ||
347 | get_canonical_hostname(options.reverse_mapping_check)); | ||
348 | if (pam_retval != PAM_SUCCESS) | ||
349 | fatal("PAM set rhost failed[%d]: %.200s", pam_retval, | ||
350 | PAM_STRERROR(pamh, pam_retval)); | ||
350 | #ifdef PAM_TTY_KLUDGE | 351 | #ifdef PAM_TTY_KLUDGE |
351 | /* | 352 | /* |
352 | * Some PAM modules (e.g. pam_time) require a TTY to operate, | 353 | * Some PAM modules (e.g. pam_time) require a TTY to operate, |