Skip to content

Commit

Permalink
Fix PAM for Arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymo111 committed Aug 5, 2020
1 parent e3ffaba commit 0383239
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Makefile.in
/missing
/stamp-h1
*.in~
pam/i3lock
13 changes: 7 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand All @@ -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
Expand Down

0 comments on commit 0383239

Please sign in to comment.