Summary(uk.UTF-8): Інструмент, що забезпечує аутентифікацію для програм
Name: pam
Version: 1.4.0
-Release: 1
+Release: 2
Epoch: 1
# The library is BSD licensed with option to relicense as GPLv2+
# - this option is redundant as the BSD license allows that anyway.
Patch4: %{name}-db-gdbm.patch
Patch5: %{name}-exec-failok.patch
Patch6: update-motd.patch
+Patch7: pam_console_pam_tty.patch
URL: http://www.linux-pam.org/
%{?with_audit:BuildRequires: audit-libs-devel >= 1.6.9}
BuildRequires: autoconf >= 2.61
# upstream has similar approach for multiple files (not no exec):
# https://github.com/linux-pam/linux-pam/pull/48
#%patch6 -p1
+%patch7 -p1
%build
%{__libtoolize}
--- /dev/null
+--- Linux-PAM-1.4.0/modules/pam_console/pam_console.c.orig 2008-12-16 13:37:52.000000000 +0100
++++ Linux-PAM-1.4.0/modules/pam_console/pam_console.c 2021-02-17 13:14:35.484487701 +0100
+@@ -521,6 +521,9 @@
+ _pam_log(pamh, LOG_ERR, TRUE, "TTY not defined");
+ return PAM_SESSION_ERR;
+ }
++ if (!strncmp("/dev/", tty, 5)) {
++ tty = tty + 5;
++ }
+
+ /* get configuration */
+ if (!configfileparsed) {
+@@ -584,6 +587,9 @@
+ if (is_root(pamh, username)) return PAM_SUCCESS;
+ pam_get_item(pamh, PAM_TTY, CAST_ME_HARDER &tty);
+ if (!tty || !tty[0]) return PAM_SESSION_ERR;
++ if (!strncmp("/dev/", tty, 5)) {
++ tty = tty + 5;
++ }
+
+ /* get configuration */
+ if (!configfileparsed) {