Bug 1945402

Summary: tcsh sets variable p to /usr/sbin from /etc/csh.login
Product: Red Hat Enterprise Linux 7 Reporter: Ameya Patil <amepatil>
Component: setupAssignee: Pavel Zhukov <pzhukov>
Status: CLOSED WONTFIX QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.9CC: pzhukov, rhel-cs-infra-services-qe
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1945400 Environment:
Last Closed: 2021-04-01 06:00:23 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:
Bug Depends On: 1945400, 2066767    
Bug Blocks:    

Description Ameya Patil 2021-03-31 19:37:29 UTC
+++ This bug was initially created as a clone of Bug #1945400 +++

Description of problem:

Anyone using (t)csh as a login shell has the variable p set to "/usr/sbin".

This can lead to unexpected consequences, e.g. when typing "cd p" (where directory p does not exist in the current working directory), example:

[user@host ~]$ /bin/tcsh -l
host_user% echo $p
/usr/sbin
host_user% pwd
/tmp
host_user% cd p
host_user% pwd
/usr/sbin

There is a foreach in /etc/csh.login that adds sbin directories to the path using the variable p. There should be an "unset p" after the foreach to clear the variable.



Version-Release number of selected component (if applicable):
Tested with the latest RHEL 8.3 - setup-2.12.2-6.el8.noarch.
And also on RHEL 7 with - setup-2.8.71-11.el7.noarch

How reproducible:
Everytime

Steps to Reproduce:
1. Install tcsh
2. Set its as the user shell or login using "tcsh -l"
3. Check that the variable p is set as /usr/sbin "echo $p"

Actual results:

Tcsh set variable p to /usr/sbin

Expected results:

Tcsh should clear variable p 

Additional info:

This also applies to Red Hat Enterprise Linux 7 so cloning this bug.

Comment 2 Pavel Zhukov 2021-04-01 06:00:23 UTC
RHEL-7 is already in Maintenance Support 2 phase, which means that only Critical impact Security Advisories and selected Urgent Priority Bug Fix Advisories may be addressed. Please see https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase for further information.

Since this bug does not meet the criteria, we'll close it as WONTFIX. Feel free to discuss this Bug with Support Representative, if this is a critical issue for for you. Please provide business justification in such case.