Commit 4fde2b8c authored by Swann Perarnau's avatar Swann Perarnau

Merge branch 'exec' into 'master'

Fix the privilege escalation bug

See merge request !2
parents 83beb192 f5eac074
......@@ -773,6 +773,8 @@ int main(int argc, char** argv)
/* We perform the execve(2) after all the cleanup is done. */
if (exec_argv)
{
if (setuid(getuid()) == -1)
argo_exit(EXIT_FAILURE, "Dropping privileges failed", errno);
execvp(exec_argv[0], exec_argv);
argo_exit(EXIT_FAILURE, "Command execution failed", errno);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment