i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit c17338052fc6edd47b95ca86e274104f5ad50e85
parent 21704224c010ad16a6cf08a774f46b5b1e6a37cc
Author: Raymond Li <hi@raymond.li>
Date:   Mon, 15 Feb 2021 00:31:18 -0500

Merge pull request #202 from msafadieh/master

Use system-local-login for PAM on Arch/Gentoo
Diffstat:
Mconfigure.ac | 15++++-----------
Mpam/i3lock | 10+++++-----
2 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -76,17 +76,10 @@ AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_ru
 
 AC_SEARCH_LIBS([shm_open], [rt])
 
-# Use system-auth instead of login on Arch
-if [[ -f /etc/arch-release ]]; then
-    echo "Using PAM for Arch"
-    sed -i "s/^#auth include system-auth/auth include system-auth/g" ../pam/i3lock
-    sed -i "s/^auth include login/#auth include login/g" ../pam/i3lock
-fi
-
-# Use system-auth instead of login on Gentoo
-if [[ -f /etc/gentoo-release ]]; then
-    echo "Using PAM for Gentoo"
-    sed -i "s/^#auth include system-auth/auth include system-auth/g" ../pam/i3lock
+# Use system-local-login instead of login on Arch and Gentoo
+if [[ -f /etc/arch-release ]] || [[ -f /etc/gentoo-release ]]; then
+    echo "Using PAM for Arch/Gentoo"
+    sed -i "s/^#auth include system-local-login/auth include system-local-login/g" ../pam/i3lock
     sed -i "s/^auth include login/#auth include login/g" ../pam/i3lock
 fi
 
diff --git a/pam/i3lock b/pam/i3lock
@@ -1,9 +1,9 @@
 #
-# PAM configuration file for the i3lock-color screen locker. By default, it
-# includes the 'system-auth' configuration file (see /etc/pam.d/system-auth)
-# for Arch and Gentoo and 'login' for Debian. Note that upstream uses only
-# 'login', which breaks on Arch and Gentoo.
+# PAM configuration file for the i3lock-color screen locker. By default, it includes
+# the 'system-local-login' configuration file (see /etc/pam.d/system-local-login)
+# for Arch and Gentoo and 'login' for Debian. Note that upstream uses only 'login',
+# which doesn't work on Arch and Gentoo.
 #
 
-#auth include system-auth # For Arch/Gentoo
+#auth include system-local-login # For Arch/Gentoo
 auth include login # For Debian