From 03832398f8ce24ff5c9c4ddf52c29b38a26d0052 Mon Sep 17 00:00:00 2001 From: Raymond Li Date: Wed, 5 Aug 2020 00:57:41 -0400 Subject: [PATCH] Fix PAM for Arch --- .gitignore | 1 + configure.ac | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 26e322c1..deb12a6c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ Makefile.in /missing /stamp-h1 *.in~ +pam/i3lock diff --git a/configure.ac b/configure.ac index eb90507d..f909ea64 100644 --- a/configure.ac +++ b/configure.ac @@ -77,6 +77,13 @@ 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 (TODO: Implement Gentoo as well) +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 + # Only disable PAM on OpenBSD where i3lock uses BSD Auth instead case "$host" in *-openbsd*) @@ -87,12 +94,6 @@ case "$host" in ;; esac -# Use system-auth instead of login on Arch (TODO: Implement Gentoo as well) -if [[ -f /etc/arch-release ]]; then - 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 - AC_SEARCH_LIBS([iconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])]) dnl Each prefix corresponds to a source tarball which users might have