raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=a77951f8231cf1160d089065cb483addb7f769b3

commit a77951f8231cf1160d089065cb483addb7f769b3
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Tue Mar 20 18:42:18 2018 +0900

    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.<br>"
+                        "This means Enlightenment cannot authenticate<br>"
+                        "your password. This means locking makes no<br>"
+                        "sense because we have no other way to 
authenticate<br>"
+                        "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])

-- 


Reply via email to