Bug 11266 - PATH setting in /etc/profile.d/kde.{csh,sh} not quite right
PATH setting in /etc/profile.d/kde.{csh,sh} not quite right
Product: Red Hat Linux
Classification: Retired
Component: kdesupport (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Depends On:
  Show dependency treegraph
Reported: 2000-05-06 18:17 EDT by chris
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-05-06 18:17:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description chris 2000-05-06 18:17:29 EDT
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 16:26:11 EDT
fixed in kdesupport-1.1.2-19
Comment 2 chris 2001-05-09 12:25:52 EDT
Looks like this has reverted to the previous broken code in kdesupport-2.1-3.

Note You need to log in before you can comment on or make changes to this bug.