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.
This commit is contained in:
Carsten Haitzler 2017-02-09 15:59:11 +09:00 committed by Mike Blumenkrantz
parent f3e6f98889
commit 60e150aeb8
1 changed files with 2 additions and 2 deletions

View File

@ -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);