summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-01-29 23:27:54 +0000
committerdes <des@FreeBSD.org>2002-01-29 23:27:54 +0000
commit27f51d26aef258131d8069a25758c1ecaa8d1d4c (patch)
treeb71ab5632352fe61fc6e796bc47544ec757155b1 /usr.bin
parentb0fc10702ad9c73c2baea40625f42e4564b923d4 (diff)
downloadFreeBSD-src-27f51d26aef258131d8069a25758c1ecaa8d1d4c.zip
FreeBSD-src-27f51d26aef258131d8069a25758c1ecaa8d1d4c.tar.gz
Back out rev 1.78, which is incorrect now that the PAM modules have been
fixed to accept a NULL PAM_RHOST.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/login/login.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index 1dcd150..d84a274 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -770,9 +770,8 @@ auth_pam()
pam_strerror(pamh, e));
return -1;
}
- if (hostname == NULL)
- gethostname(full_hostname, sizeof full_hostname);
- if ((e = pam_set_item(pamh, PAM_RHOST, full_hostname)) != PAM_SUCCESS) {
+ if (hostname != NULL &&
+ (e = pam_set_item(pamh, PAM_RHOST, full_hostname)) != PAM_SUCCESS) {
syslog(LOG_ERR, "pam_set_item(PAM_RHOST): %s",
pam_strerror(pamh, e));
return -1;
OpenPOWER on IntegriCloud