raster pushed a commit to branch master.

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

commit ef6c178a172ca4423636d7bb61a62e4c86c3eb0b
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Feb 9 15:59:11 2017 +0900

    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 54c60b9..acd1f03 100644
--- a/src/bin/e_sys_main.c
+++ b/src/bin/e_sys_main.c
@@ -179,6 +179,8 @@ main(int argc,
    if (!action) exit(1);
    fprintf(stderr, "action %s %i\n", action, argc);
 
+   eina_init();
+
    uid = getuid();
    gid = getgid();
    egid = getegid();
@@ -199,8 +201,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);

-- 


Reply via email to