summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-20 09:25:19 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-20 09:25:19 +0000
commit422e2227dd9b627cada9e9501586c1e1ab8f6956 (patch)
tree2f4b849646c93242711d1033a07459095bd35c58
parent37b86688af91bde6c1a24dc26f09ca18568d0338 (diff)
downloadurpmi-422e2227dd9b627cada9e9501586c1e1ab8f6956.tar
urpmi-422e2227dd9b627cada9e9501586c1e1ab8f6956.tar.gz
urpmi-422e2227dd9b627cada9e9501586c1e1ab8f6956.tar.bz2
urpmi-422e2227dd9b627cada9e9501586c1e1ab8f6956.tar.xz
urpmi-422e2227dd9b627cada9e9501586c1e1ab8f6956.zip
urpme should croak when it's not run as root
-rw-r--r--urpme4
1 files changed, 4 insertions, 0 deletions
diff --git a/urpme b/urpme
index f3358400..2c77486b 100644
--- a/urpme
+++ b/urpme
@@ -62,6 +62,10 @@ my $state = {};
#- remove verbose if not asked.
$verbose or $urpm->{log} = sub {};
+if ($< && !$test) {
+ $urpm->{fatal}(1, N("Only superuser is allowed to remove packages"));
+}
+
#- just configure parallel mode if available.
$urpm->configure(
synthesis => ($parallel ? 'none' : ''),