summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
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.addmedia
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.addmedia')
-rwxr-xr-xurpmi.addmedia3
1 files changed, 3 insertions, 0 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 735879c9..d02e47fb 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -105,6 +105,9 @@ sub main {
$options{distrib} or $url or ($url, $name) = ($name, '');
my ($type) = $url =~ m,^([^:]*)://, or $options{distrib} or usage;
+ if ($< != 0) {
+ $urpm->{fatal}(1, N("Only superuser is allowed to add media"));
+ }
$urpm->read_config;
exists $options{limit_rate} or $options{limit_rate} = $urpm->{options}{'limit-rate'};