diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-20 09:25:19 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-20 09:25:19 +0000 |
commit | 422e2227dd9b627cada9e9501586c1e1ab8f6956 (patch) | |
tree | 2f4b849646c93242711d1033a07459095bd35c58 | |
parent | 37b86688af91bde6c1a24dc26f09ca18568d0338 (diff) | |
download | urpmi-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-- | urpme | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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' : ''), |