Bug 671289

Summary: /etc/profile.d/which2.csh should be removed
Product: Red Hat Enterprise Linux 6 Reporter: Masahiro Matsuya <mmatsuya>
Component: whichAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: angelotech, cww, jwest, mvadkert, pknirsch, pkovar, rda, spurrier
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Prior to this update, the /etc/profile.d/which2.csh file caused an alias for the "which" command to be created. As a result, the "which" command included in the "which" package was used instead of the built-in "which" command as included in the C shell (csh). The problem has been fixed in this update by removing the /etc/profile.d/which2.csh file so that the "which" command included in csh is now used as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-29 07:42:45 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 Masahiro Matsuya 2011-01-21 01:10:37 UTC
Description of problem:
/etc/profile.d/which2.csh should be removed. It create an alias for 'which', and it forces to use the which command in the which package. But, csh has a which builtin command. It's better that the builtin command is used for csh by default, rather than what provided by the which package.

Version-Release number of selected component (if applicable):
which-2.19-5.1.el6

How reproducible:
Always

Steps to Reproduce:
1. install which package
2. check if there is /etc/profile.d/which2.csh
  
Actual results:
There is /etc/profile.d/which2.csh.

Expected results:
There is no /etc/profile.d/which2.csh

Additional info:

Comment 2 RHEL Program Management 2011-01-21 01:28:06 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 Suzanne Logcher 2011-02-15 21:46:45 UTC
This issue was proposed for RHEL 6.1 FasTrack but did not get resolved in time.
It has been moved to RHEL 6.2 FasTrack.

Comment 6 Angelo Bonet 2011-03-29 21:53:57 UTC
I just ran into this problem on RHEL 6 -- couldn't figure out why 'which' was suddenly behaving differently.  Then I realized I was no longer using the same 'which' I've been for years, but instead was running /usr/bin/which.

/usr/bin/which differs from the tcsh builtin in a couple of significant ways:

  * /usr/bin/which doesn't report shell builtins (e.g. echo)
  * /usr/bin/which sends errors to stderr, the builtin sends them to stdout
  * /usr/bin/which creates much larger error messages when it cannot find the command requested (prints the entire $PATH)
  * /usr/bin/which runs much slower than the builtin (from the tcsh manpage: builtin which "is 10 to 100 times faster")


Above and beyond the obnoxious behavior changes, there's an oddball comment in which2.csh that reads:

   # export AFS if you are in AFS environment

That comment just seems outright wrong considering what that file is doing.

Comment 15 errata-xmlrpc 2011-06-29 07:42:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0911.html