Skip to content
Snippets Groups Projects
Commit 217dfe7c authored by Andy Green's avatar Andy Green
Browse files

drop_privs: ignore if uid or gid is zero

0 is the natural default for the info struct.

If you are not 0 (root) then you can't change to root, it will fail
without having done anything.  What the user probably wanted is
just leave it as the uid/gid it was started as.

If you are 0 (root) you are already at 0 and the change has no
meaning.

Net effect is get rid of two warning logs if you left it at 0 in
the info struct and start as non-root.
parent 69e4433f
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment