From 60e150aeb82fe9d19a4670d34ac54899d0dba9e6 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 9 Feb 2017 15:59:11 +0900 Subject: [PATCH] enlightenment_sys - eina_init BEFORE switching uid - safer in case eina_init uses env vars, move it to befor setuid() so it can detect. you normally would setuid only for a limited op and we do it for "the rest of the running" as e_sys is fairly simple. --- src/bin/e_sys_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_sys_main.c b/src/bin/e_sys_main.c index 79f30efb3..7109450d4 100644 --- a/src/bin/e_sys_main.c +++ b/src/bin/e_sys_main.c @@ -120,6 +120,8 @@ main(int argc, if (!action) exit(1); fprintf(stderr, "action %s %i\n", action, argc); + eina_init(); + uid = getuid(); gid = getgid(); egid = getegid(); @@ -140,8 +142,6 @@ main(int argc, exit(7); } - eina_init(); - if (!auth_action_ok(action, gid, gl, gn, egid)) { printf("ERROR: ACTION NOT ALLOWED: %s\n", action);