From b8ea0699c4a6c42db46d9a33252eabef12cf8bd5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 17 Sep 2013 00:23:26 -0400 Subject: [PATCH] drop_privileges: fix setuid check The code attempts to check the return of setuid, but forgets to assign the result variable. Signed-off-by: Mike Frysinger --- common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.c b/common.c index f3bae27..3d570d0 100644 --- a/common.c +++ b/common.c @@ -511,7 +511,7 @@ void drop_privileges(const char* user_name) res = setgid(pw->pw_gid); CHECK_RES_DIE(res, "setgid"); - setuid(pw->pw_uid); + res = setuid(pw->pw_uid); CHECK_RES_DIE(res, "setuid"); }