summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-10-05 17:10:51 +0200
committerDan McGee <dan@archlinux.org>2007-10-14 17:56:40 -0500
commit5d30c5c0b76e76b336abd2486ac6d24dd972fcc3 (patch)
treed0cb04a51ecc95ee91cf119f5eb57fb59bbf730e
parentabce73de4cc124da946a4da2d413b784332d91db (diff)
downloadpacman-5d30c5c0b76e76b336abd2486ac6d24dd972fcc3.tar.xz
pacman/pacman.c : put back root check even if -r is specified.
Root is needed for most install / remove operation, because it's needed for chrooting, for running scriptlets. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
-rw-r--r--src/pacman/pacman.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 5d8694c1..8474020f 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -782,9 +782,7 @@ int main(int argc, char *argv[])
#if defined(HAVE_GETEUID)
/* check if we have sufficient permission for the requested operation */
- if(myuid > 0 && !strcmp(alpm_option_get_root(), "/") && needs_transaction()) {
- /* special case: ignore root user check if -r is specified, fall back on
- * normal FS checking */
+ if(myuid > 0 && needs_transaction()) {
pm_printf(PM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n"));
cleanup(EXIT_FAILURE);
}