]> git.pld-linux.org Git - packages/pam.git/commitdiff
keep on using PAM_TTY without /dev/ prefix in unmaintained pam_console module; rel 2 auto/th/pam-1.4.0-2
authorJan Palus <atler@pld-linux.org>
Wed, 17 Feb 2021 12:31:27 +0000 (13:31 +0100)
committerJan Palus <atler@pld-linux.org>
Wed, 17 Feb 2021 12:31:27 +0000 (13:31 +0100)
login changed it in 2.36.2:
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?h=stable/v2.36&id=f40291fff8fe35ea3b8632e6a24ca17d760e1187

pam.spec
pam_console_pam_tty.patch [new file with mode: 0644]

index 3957ae93d2e1966ed994fc336f874dd1e20c3a42..1107982609bf648526aac9961f586ddcb1ade31b 100644 (file)
--- a/pam.spec
+++ b/pam.spec
@@ -24,7 +24,7 @@ Summary(tr.UTF-8):    Modüler, artımsal doğrulama birimleri
 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.
@@ -50,6 +50,7 @@ Patch3:               %{name}-mkhomedir-notfound.patch
 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
@@ -282,6 +283,7 @@ danych GDBM.
 # 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}
diff --git a/pam_console_pam_tty.patch b/pam_console_pam_tty.patch
new file mode 100644 (file)
index 0000000..f173398
--- /dev/null
@@ -0,0 +1,22 @@
+--- 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) {
This page took 0.044862 seconds and 4 git commands to generate.