Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
containers
Commits
f5eac074
Commit
f5eac074
authored
Dec 19, 2017
by
Kamil Iskra
Browse files
Fix the privilege escalation bug
parent
83beb192
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/argo_nodeos_config.cpp
View file @
f5eac074
...
@@ -773,6 +773,8 @@ int main(int argc, char** argv)
...
@@ -773,6 +773,8 @@ int main(int argc, char** argv)
/* We perform the execve(2) after all the cleanup is done. */
/* We perform the execve(2) after all the cleanup is done. */
if
(
exec_argv
)
if
(
exec_argv
)
{
{
if
(
setuid
(
getuid
())
==
-
1
)
argo_exit
(
EXIT_FAILURE
,
"Dropping privileges failed"
,
errno
);
execvp
(
exec_argv
[
0
],
exec_argv
);
execvp
(
exec_argv
[
0
],
exec_argv
);
argo_exit
(
EXIT_FAILURE
,
"Command execution failed"
,
errno
);
argo_exit
(
EXIT_FAILURE
,
"Command execution failed"
,
errno
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment