summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
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'};