diff options
author | des <des@FreeBSD.org> | 2002-01-24 16:20:17 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-01-24 16:20:17 +0000 |
commit | 9816fc1afba47a49ed2e25b41206aa151385e8e8 (patch) | |
tree | 066b27e0366f89a75dec1f6bb456adc2532c25ee /usr.bin/su/su.c | |
parent | 37b85e4ec48766ceecedb9ea13b500be919838eb (diff) | |
download | FreeBSD-src-9816fc1afba47a49ed2e25b41206aa151385e8e8.zip FreeBSD-src-9816fc1afba47a49ed2e25b41206aa151385e8e8.tar.gz |
Don't set PAM_RHOST, this is a local login.
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'usr.bin/su/su.c')
-rw-r--r-- | usr.bin/su/su.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index dec6a12..108d574 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -122,8 +122,7 @@ main(int argc, char *argv[]) gid_t gid; int asme, ch, asthem, fastlogin, prio, i, setwhat, retcode, statusp, child_pid, child_pgrp, ret_pid; - char *username, *cleanenv, *class, shellbuf[MAXPATHLEN], - myhost[MAXHOSTNAMELEN + 1]; + char *username, *cleanenv, *class, shellbuf[MAXPATHLEN]; const char *p, *user, *shell, *mytty, **nargv; shell = class = cleanenv = NULL; @@ -217,9 +216,6 @@ main(int argc, char *argv[]) PAM_SET_ITEM(PAM_RUSER, getlogin()); - gethostname(myhost, sizeof(myhost)); - PAM_SET_ITEM(PAM_RHOST, myhost); - mytty = ttyname(STDERR_FILENO); if (!mytty) mytty = "tty"; |