diff options
author | des <des@FreeBSD.org> | 2003-02-15 23:16:41 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-02-15 23:16:41 +0000 |
commit | 56e06910f2fc2720d9389293d38489e3195557ef (patch) | |
tree | 75887c32232238006d0cc8c9ec45db472c846d9f /usr.bin | |
parent | 6b0752c4917c5dbd07c7d9e405765c39f40f565c (diff) | |
download | FreeBSD-src-56e06910f2fc2720d9389293d38489e3195557ef.zip FreeBSD-src-56e06910f2fc2720d9389293d38489e3195557ef.tar.gz |
Set PAM_RHOST to "localhost" if no remote host was specified. This allows
pam_opieaccess() to work as expected for local logins.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/login/login.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 5eb60fb..a000360 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -297,7 +297,8 @@ main(int argc, char *argv[]) pam_syslog("pam_set_item(PAM_TTY)"); bail(NO_SLEEP_EXIT, 1); } - pam_err = pam_set_item(pamh, PAM_RHOST, hostname); + pam_err = pam_set_item(pamh, PAM_RHOST, + hostname == NULL ? "localhost" : hostname); if (pam_err != PAM_SUCCESS) { pam_syslog("pam_set_item(PAM_RHOST)"); bail(NO_SLEEP_EXIT, 1); |