index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-21 16:50:01 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-21 16:50:01 +0000 |
commit | 2d08e902ef07b4a888fa3daf2d5a658dd04dac4e (patch) | |
tree | 13c3fbaaf925e735aa10ab945e29e82d23df685f /lib/libalpm | |
parent | cf94007aed7eb87a38090a62b9ddf606ea1343c9 (diff) |
-rw-r--r-- | lib/libalpm/handle.c | 6 |
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 59ba46ed..b8a6713b 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -55,13 +55,19 @@ pmhandle_t *handle_new() #ifndef CYGWIN /* see if we're root or not */ handle->uid = geteuid(); +#ifndef FAKEROOT if(!handle->uid && getenv("FAKEROOTKEY")) { /* fakeroot doesn't count, we're non-root */ handle->uid = 99; } +#endif /* see if we're root or not (fakeroot does not count) */ +#ifndef FAKEROOT if(handle->uid == 0 && !getenv("FAKEROOTKEY")) { +#else + if(handle->uid == 0) { +#endif handle->access = PM_ACCESS_RW; } else { handle->access = PM_ACCESS_RO; |