From a3abcefc4aaae3fba272c4181826c951bf179353 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 15 Apr 2020 14:00:52 +0200 Subject: Fix a PAM related bug and update README.md --- i3lock.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'i3lock.c') diff --git a/i3lock.c b/i3lock.c index 7f8763a..4ef0f73 100644 --- a/i3lock.c +++ b/i3lock.c @@ -1384,7 +1384,11 @@ int main(int argc, char *argv[]) { #ifndef __OpenBSD__ /* Initialize PAM */ +#ifdef EXTRAS + if ((ret = pam_start("i3lock-extended", username, &conv, &pam_handle)) != PAM_SUCCESS) +#else if ((ret = pam_start("i3lock", username, &conv, &pam_handle)) != PAM_SUCCESS) +#endif errx(EXIT_FAILURE, "PAM: %s", pam_strerror(pam_handle, ret)); if ((ret = pam_set_item(pam_handle, PAM_TTY, getenv("DISPLAY"))) != PAM_SUCCESS) -- cgit v1.3