os: use PrivsElevated instead of a manual check

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
This commit is contained in:
Nicolai Hähnle 2018-03-13 17:46:35 -04:00 committed by Adam Jackson
parent 9ef602de46
commit 1b6910af12
1 changed files with 1 additions and 1 deletions

View File

@ -1863,7 +1863,7 @@ CheckUserParameters(int argc, char **argv, char **envp)
char *a, *e = NULL;
#if CHECK_EUID
if (geteuid() == 0 && getuid() != geteuid())
if (PrivsElevated())
#endif
{
/* Check each argv[] */