From 567cb34ec5da9e2298da89b6a4aff2ee9d35ceb6 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 13 Jul 2004 05:03:49 +0000 Subject: Remove setuid support in urpmi. Fix the error message when it's run as non-root. --- urpmi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/urpmi b/urpmi index bea2338c..f24a940f 100755 --- a/urpmi +++ b/urpmi @@ -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, -- cgit v1.2.1