From 18c74f8107284015e77b512d14846ec15c6b9e23 Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Wed, 5 Jul 2017 10:30:46 +0900 Subject: [PATCH] Use geteuid() to check the current privilege instead of getuid() in gum_utils_gain_privileges() Change-Id: Ibfaa0091bf5882043e4a01ef87455398d02fef5e Signed-off-by: Hyotaek Shim --- src/common/gum-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/gum-utils.c b/src/common/gum-utils.c index ff6298e..cf9f7ff 100644 --- a/src/common/gum-utils.c +++ b/src/common/gum-utils.c @@ -152,7 +152,7 @@ void gum_utils_drop_privileges () */ void gum_utils_gain_privileges () { - if (getuid() == (uid_t)0) return; + if (geteuid() == (uid_t)0) return; if (seteuid (0)) WARN ("seteuid() failed"); } -- 2.7.4