Bug 114616

Summary: insecure PATH variable set by login as root
Product: Red Hat Enterprise Linux 3 Reporter: Thilo Müller <thilo.mueller>
Component: util-linuxAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: herrmann, laroche, ralf
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-24 15:54:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thilo Müller 2004-01-30 07:57:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030922

Description of problem:
When logging in as root the /usr/local directories are inserted in the
PATH variable before /usr/sbin /sbin /usr/bin /bin


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Login as root
2.echo $PATH


    

Actual Results: 
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin


Expected Results: 
3./usr/kerberos/sbin:/usr/kerberos/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/local/sbin:/usr/local/bin

The /usr/local directories should be used last in the PATH variable

Additional info:

Comment 1 Elliot Lee 2004-02-24 15:54:25 UTC
Typically /usr/local/*bin are placed ahead in the path to allow local
overrides of programs that come with the OS.

Because only root can write to /usr/local/* on a default install, this
doesn't pose a security risk.