]> git.ipfire.org Git - thirdparty/util-linux.git/commit
login: 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, 10 Feb 2021 09:22:57 +0000 (10:22 +0100)
commitf40291fff8fe35ea3b8632e6a24ca17d760e1187
treef9db4ecd5dee1b3d8cb9fbb888433b4194349600
parent9a48cbd0044cf3ef196cacb7a59592a78391f896
login: 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/login.c