summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 8511621a..ea3babe3 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -101,10 +101,12 @@ int main(int argc, char *argv[])
#ifndef CYGWIN
/* see if we're root or not */
myuid = geteuid();
+#ifndef FAKEROOT
if(!myuid && getenv("FAKEROOTKEY")) {
/* fakeroot doesn't count, we're non-root */
myuid = 99;
}
+#endif
/* check if we have sufficient permission for the requested operation */
if(myuid > 0) {