summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-13 05:12:19 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-13 05:12:19 +0000
commit2251687c07d6f102a481f4cd3427091d278b8705 (patch)
tree90e9321c55cd57b6c993dbb52089ed5eba190262 /urpmi.removemedia
parent567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6 (diff)
downloadurpmi-2251687c07d6f102a481f4cd3427091d278b8705.tar
urpmi-2251687c07d6f102a481f4cd3427091d278b8705.tar.gz
urpmi-2251687c07d6f102a481f4cd3427091d278b8705.tar.bz2
urpmi-2251687c07d6f102a481f4cd3427091d278b8705.tar.xz
urpmi-2251687c07d6f102a481f4cd3427091d278b8705.zip
More checks for root capabilities
Diffstat (limited to 'urpmi.removemedia')
-rwxr-xr-xurpmi.removemedia6
1 files changed, 5 insertions, 1 deletions
diff --git a/urpmi.removemedia b/urpmi.removemedia
index db586211..97fad3d9 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -43,7 +43,11 @@ where <name> is a medium name to remove.
push @toremoves, $_;
}
- my $urpm = new urpm; $urpm->read_config;
+ my $urpm = new urpm;
+ if ($< != 0) {
+ $urpm->{fatal}(1, N("Only superuser is allowed to remove media"));
+ }
+ $urpm->read_config;
my @entries = map { $_->{name} } @{$urpm->{media}};
if ($options{all}) {