]> git.ipfire.org Git - thirdparty/util-linux.git/commit
su: use full tty path for PAM_TTY
authorKarel Zak <kzak@redhat.com>
Wed, 3 Feb 2021 13:45:15 +0000 (14:45 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 3 Feb 2021 13:45:15 +0000 (14:45 +0100)
commit61653767371048c805ae8032951476c547d19e09
tree32bc5f2d4c5b443554368f383a5b896678e99f8c
parent82643a9be507bd20df98d38c8248299d1084ac74
su: use full tty path for PAM_TTY

pam_set_item() man page:
 PAM_TTY
   The terminal name: prefixed by /dev/ if it is a device file;
   for graphical, X-based, applications the value for this item
   should be the $DISPLAY variable.

It seems for example pam_timestamp module is not robust enough to
differentiate between /dev/ and pty/0 and it assumes that '/' in the
path always means '/dev/' prefix ...

Fixes: https://github.com/karelzak/util-linux/issues/1242
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su-common.c