From 29bf6a28ab9735e7e293735f1612129e8c1c6d3c Mon Sep 17 00:00:00 2001 From: jeon Date: Tue, 9 Jul 2019 16:02:11 +0900 Subject: [PATCH] e_devicemgr: check socket fd is not negative before cynara check Change-Id: Ie9963f4bbfd63f9e4a10a4f9298e935bbd62c432 --- src/bin/e_devicemgr_wl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/e_devicemgr_wl.c b/src/bin/e_devicemgr_wl.c index cdc5663..38682a5 100644 --- a/src/bin/e_devicemgr_wl.c +++ b/src/bin/e_devicemgr_wl.c @@ -37,6 +37,7 @@ _e_devicemgr_util_do_privilege_check(struct wl_client *client, int socket_fd, co /* If initialization of cynara has been failed, let's not to do further permission checks. */ if (e_devicemgr->wl_data->p_cynara == NULL && e_devicemgr->wl_data->cynara_initialized) return EINA_TRUE; + if (socket_fd < 0) return EINA_FALSE; ret = cynara_creds_socket_get_client(socket_fd, CLIENT_METHOD_SMACK, &clientSmack); E_DEVMGR_CYNARA_ERROR_CHECK_GOTO("cynara_creds_socket_get_client", ret, finish); -- 2.7.4