diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-13 05:03:49 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-13 05:03:49 +0000 |
commit | 567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6 (patch) | |
tree | e5520833641ef0c98007982f6d578f37b51e3da4 | |
parent | 96e174e53408b11cd97687c340ccb5a82549cb26 (diff) | |
download | urpmi-567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6.tar urpmi-567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6.tar.gz urpmi-567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6.tar.bz2 urpmi-567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6.tar.xz urpmi-567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6.zip |
Remove setuid support in urpmi. Fix the error message when it's run as
non-root.
-rwxr-xr-x | urpmi | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -55,7 +55,6 @@ our $verbose = 0; our $usedistrib = 0; our $log = ''; -my $uid; my @files; my @src_files; my @names; @@ -63,7 +62,6 @@ my @src_names; $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"; delete @ENV{qw(ENV BASH_ENV IFS CDPATH)}; -($<, $uid) = ($>, $<); $ENV{HOME} ||= "/root"; $ENV{USER} ||= "root"; @@ -255,7 +253,7 @@ if ($env) { $urpm->{instlist} = "$env/inst.list"; $urpm->{statedir} = $env; } else { - if ($uid > 0) { + if ($< != 0) { #- need to be root if binary rpms are to be installed $auto_select || @names || @files and $urpm->{fatal}(1, N("Only superuser is allowed to install packages")); } else { @@ -314,7 +312,7 @@ unless ($env) { $urpm->exlock_rpm_db; $urpm->shlock_urpmi_db; } -$urpm->configure(nocheck_access => $env || $uid > 0, +$urpm->configure(nocheck_access => $env || $< != 0, media => $media, excludemedia => $excludemedia, sortmedia => $sortmedia, |