summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-21 16:50:01 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-21 16:50:01 +0000
commit2d08e902ef07b4a888fa3daf2d5a658dd04dac4e (patch)
tree13c3fbaaf925e735aa10ab945e29e82d23df685f /src
parentcf94007aed7eb87a38090a62b9ddf606ea1343c9 (diff)
downloadpacman-2d08e902ef07b4a888fa3daf2d5a658dd04dac4e.tar.xz
added a FAKEROOT define allowing to use pacman in a fakeroot enivronment (for tests purpose)
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) {