summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-09 18:50:15 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-09 18:50:15 +0900
commit1a481cfe4d47974840b05b4a396c71ce1c987570 (patch)
treec8f0d960463d26d737cfb110174e85334a4e62a6 /src/lib/eina
parentd345b899b2fa5eb628a2d433fd60868bfab162e2 (diff)
eina utils and vpath - use euid not uid if setuid for correct user
was using uid not euid for "if setuid use safe way to get location" - ie the user that effectively owns the process, not nominally. @fix
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c
index 93396ae072..7205a45799 100644
--- a/src/lib/eina/eina_util.c
+++ b/src/lib/eina/eina_util.c
@@ -81,7 +81,7 @@ eina_environment_home_get(void)
81 struct passwd pwent, *pwent2 = NULL; 81 struct passwd pwent, *pwent2 = NULL;
82 char pwbuf[8129]; 82 char pwbuf[8129];
83 83
84 if (!getpwuid_r(getuid(), &pwent, pwbuf, sizeof(pwbuf), &pwent2)) 84 if (!getpwuid_r(geteuid(), &pwent, pwbuf, sizeof(pwbuf), &pwent2))
85 { 85 {
86 if ((pwent2) && (pwent.pw_dir)) 86 if ((pwent2) && (pwent.pw_dir))
87 home = strdup(pwent.pw_dir); 87 home = strdup(pwent.pw_dir);