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:
parent
f3e6f98889
commit
60e150aeb8
|
@ -120,6 +120,8 @@ main(int argc,
|
||||||
if (!action) exit(1);
|
if (!action) exit(1);
|
||||||
fprintf(stderr, "action %s %i\n", action, argc);
|
fprintf(stderr, "action %s %i\n", action, argc);
|
||||||
|
|
||||||
|
eina_init();
|
||||||
|
|
||||||
uid = getuid();
|
uid = getuid();
|
||||||
gid = getgid();
|
gid = getgid();
|
||||||
egid = getegid();
|
egid = getegid();
|
||||||
|
@ -140,8 +142,6 @@ main(int argc,
|
||||||
exit(7);
|
exit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
eina_init();
|
|
||||||
|
|
||||||
if (!auth_action_ok(action, gid, gl, gn, egid))
|
if (!auth_action_ok(action, gid, gl, gn, egid))
|
||||||
{
|
{
|
||||||
printf("ERROR: ACTION NOT ALLOWED: %s\n", action);
|
printf("ERROR: ACTION NOT ALLOWED: %s\n", action);
|
||||||
|
|
Loading…
Reference in New Issue