diff options
author | des <des@FreeBSD.org> | 2003-02-06 14:29:28 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-02-06 14:29:28 +0000 |
commit | c4a7a7ecc197c8456119101664292c4081f8de43 (patch) | |
tree | 52667bca96e0179b189e60ac3deb689294d179cd /usr.bin/su | |
parent | 1f26428646314d385b983ca61b3187f308c55fa2 (diff) | |
download | FreeBSD-src-c4a7a7ecc197c8456119101664292c4081f8de43.zip FreeBSD-src-c4a7a7ecc197c8456119101664292c4081f8de43.tar.gz |
Pass the correct, verified username to PAM instead of getlogin().
Diffstat (limited to 'usr.bin/su')
-rw-r--r-- | usr.bin/su/su.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 434b4c7..63849ca 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -225,7 +225,7 @@ main(int argc, char *argv[]) errx(1, "pam_start: %s", pam_strerror(pamh, retcode)); } - PAM_SET_ITEM(PAM_RUSER, getlogin()); + PAM_SET_ITEM(PAM_RUSER, username); mytty = ttyname(STDERR_FILENO); if (!mytty) |