Bug 11266

Summary: PATH setting in /etc/profile.d/kde.{csh,sh} not quite right
Product: [Retired] Red Hat Linux Reporter: chris
Component: kdesupportAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-05-06 22:17:29 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 chris 2000-05-06 22:17:29 UTC
In /etc/profile.d/kde.csh, there's a line which says:

  echo ${PATH} | grep -q ${kdepath}

This doesn't check whether an entire PATH component matches ${kdepath}; it
may match a substring of a PATH component (e.g. if kdepath=/usr/local/bin,
and I have /usr/local/bin/scripts on my PATH but *not* /usr/local/bin, grep
will still exit with a success code...bad example, but you get the idea).

Presumably a better plan would be something like:

  echo ${PATH} | egrep -q '(:|^)'"${kdepath}"'(:|$)'

Similarly in /etc/profile.d/kde.sh

Comment 1 Ngo Than 2000-09-12 20:26:11 UTC
fixed in kdesupport-1.1.2-19

Comment 2 chris 2001-05-09 16:25:52 UTC
Looks like this has reverted to the previous broken code in kdesupport-2.1-3.