Use geteuid() to check the current privilege instead of getuid() in gum_utils_gain_pr... 02/137202/1
authorHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 5 Jul 2017 01:30:46 +0000 (10:30 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 5 Jul 2017 01:30:46 +0000 (10:30 +0900)
Change-Id: Ibfaa0091bf5882043e4a01ef87455398d02fef5e
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
src/common/gum-utils.c

index ff6298e..cf9f7ff 100644 (file)
@@ -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");
 }