Bug 12731 - Multiple instances of directory in PATH variable
Multiple instances of directory in PATH variable
Product: Red Hat Linux
Classification: Retired
Component: krb5 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Depends On:
  Show dependency treegraph
Reported: 2000-06-19 18:17 EDT by Ashwin Kalbag
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-06-20 10:06:36 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 Ashwin Kalbag 2000-06-19 18:17:26 EDT

I recently installed Red Hat Linux 6.2 Professional (i686) on a Pentium 
III Dell as a dual boot system with Windows NT 4.0.  I also added the 
Kerberos 5 security advisory fix.  I'm set up to run the Gnome desktop.

I now find that when I'm logged in as "root" user (default shell 
is "bash"), the following happens:
1.  If I get a teletype terminal with Ctrl-Alt-F2 and then login as root 
and do an "echo $PATH", my PATH variable is OK.
2.  If I get a "Regular Xterm" from the Gnome "Utilities" menu, and 
then "echo $PATH", I see the 
directories "/usr/kerberos/sbin:/usr/kerberos/bin" prepended to my PATH 
variable 3 times instead of 1.

I believe this is due to the fact that because I'm running "bash", 
both /etc/profile.d/krb5.csh and /etc/profile.d/krb5.sh are being run 
from /etc/bashrc and/or /etc/csh.cshrc, /etc/csh.login.  This results in 
the prepending the Kerberos paths 3 times to the original value of PATH.

I'm not sure if this explanation is correct - but I'd like to know what's 
causing it and how to fix this.  I don't want my PATH var to contain 
garbage, especially as "root".

Thanks in advance.

Ashwin Kalbag
Comment 1 Nalin Dahyabhai 2000-06-19 18:59:33 EDT
This should be fixed in the latest Kerberos 5 packages in our build tree and in
Raw Hide (ftp://ftp.redhat.com/pub/rawhide/).
Comment 2 Ashwin Kalbag 2000-06-20 09:57:02 EDT
It's nice that the bug is fixed in a forthcoming release of Red Hat.  But I
would like to fix this on my current system, without installing the RawHide
version which has other fixes in it as well and messing my system up.

What do I need to change on my system right now to make it go away?
Comment 3 Ashwin Kalbag 2000-06-20 10:06:32 EDT
BTW, I went to ftp://ftp.redhat.com/pub/rawhide/i386/RedHat/RPMS/.
I didn't find my version krb5-xxx-1.1.1-21, I found 1.1.1-20, but
krb5-configs-1.1.1-20 was missing.  Also the dates on the other 4 rpms of krb5
are Jun 8, 2000 - before my reporting the fix.  Are you sure this is the correct
site, or am I doing something wrong?
Comment 4 Nalin Dahyabhai 2000-06-20 10:36:25 EDT
Raw Hide probably hasn't been refreshed for almost a week now.  We released a
security errata for 6.2 that unfortunately predates that fix (all of the
Kerberos erratas are backports of what we have in the development tree, from
which Raw Hide is built).  Anyhow, the scripts in /etc/profile.d never checked
that the directory in question might already be in the PATH before adding it
again.  The fixed krb5.sh:

if ! echo ${PATH} | grep -q /usr/kerberos/bin ; then
if ! echo ${PATH} | grep -q /usr/kerberos/sbin ; then
	if [ `id -u` = 0 ] ; then

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