check exit status from auth subprocess

if the process doesn't exit then auth didn't succeed and this is a system issue

ref T5604
This commit is contained in:
Mike Blumenkrantz 2017-06-30 10:25:23 -04:00
parent 42523d27f0
commit 3fdcc92ab0
1 changed files with 3 additions and 3 deletions

View File

@ -570,14 +570,14 @@ _lokker_cb_exit(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
_auth_child_pid = -1; _auth_child_pid = -1;
/* ok */ /* ok */
if (ev->exit_code == 0) if (ev->exited && (ev->exit_code == 0))
{ {
/* security - null out passwd string once we are done with it */ /* security - null out passwd string once we are done with it */
_lokker_null(); _lokker_null();
e_desklock_hide(); e_desklock_hide();
} }
/* error */ /* error */
else if (ev->exit_code < 128) else if ((!ev->exited) || (ev->exit_code < 128))
{ {
/* security - null out passwd string once we are done with it */ /* security - null out passwd string once we are done with it */
_lokker_null(); _lokker_null();
@ -586,7 +586,7 @@ _lokker_cb_exit(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
_("Authentication via PAM had errors setting up the<br>" _("Authentication via PAM had errors setting up the<br>"
"authentication session. The error code was <hilight>%i</hilight>.<br>" "authentication session. The error code was <hilight>%i</hilight>.<br>"
"This is bad and should not be happening. Please report this bug.") "This is bad and should not be happening. Please report this bug.")
, ev->exit_code); , ev->exited ? ev->exit_code : ev->exit_signal);
} }
/* failed auth */ /* failed auth */
else else