diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-13 05:12:19 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-13 05:12:19 +0000 |
commit | 2251687c07d6f102a481f4cd3427091d278b8705 (patch) | |
tree | 90e9321c55cd57b6c993dbb52089ed5eba190262 /urpmi.removemedia | |
parent | 567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6 (diff) | |
download | urpmi-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-x | urpmi.removemedia | 6 |
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}) { |