From a77951f8231cf1160d089065cb483addb7f769b3 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 20 Mar 2018 18:42:18 +0900 Subject: [PATCH] desklock - make it fail to lock on non-bsd platforms if no pam support if no pam support detected at build time, dont even lock to begin with. this should fix T6779 yes - even better is making pam a requirement for building and to be optionallhy disabled, but then even if disabled we still need this check. this has been a long long long standing bug in e. i think this is why we had some reports of "any password unlocks e" - because it was built without pam support and before auth was always succeeding without pam. now it is always FAILING instead (which is probably better). @fix --- src/bin/e_desklock.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c index 7b99fccfa..0e6cc3d71 100644 --- a/src/bin/e_desklock.c +++ b/src/bin/e_desklock.c @@ -247,6 +247,15 @@ e_desklock_show(Eina_Bool suspend) E_Desklock_Hide_Cb hide_cb; E_Zone *zone; +#if !defined(HAVE_PAM) && !defined(__FreeBSD__) && !defined(__OpenBSD__) + e_util_dialog_show(_("Cannot use password authentication"), + _("Enlightenment was built without PAM support.
" + "This means Enlightenment cannot authenticate
" + "your password. This means locking makes no
" + "sense because we have no other way to authenticate
" + "you as a user.")); + return EINA_FALSE; +#endif if (_e_desklock_state) return EINA_TRUE; if (e_desklock_is_external() && e_config->desklock_custom_desklock_cmd && e_config->desklock_custom_desklock_cmd[0])