Bug 1945400

Summary: tcsh sets variable p to /usr/sbin from /etc/csh.login
Product: Red Hat Enterprise Linux 8 Reporter: Ameya Patil <amepatil>
Component: setupAssignee: Martin Osvald 🛹 <mosvald>
Status: CLOSED ERRATA QA Contact: Petr Dancak <pdancak>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.3CC: pdancak
Target Milestone: betaKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: setup-2.12.2-7.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1945402 2066767 (view as bug list) Environment:
Last Closed: 2022-11-08 10:54:13 UTC Type: Bug
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: 2019874    
Bug Blocks: 1945402, 2066767    

Description Ameya Patil 2021-03-31 19:21:59 UTC
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 11 errata-xmlrpc 2022-11-08 10:54:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (setup bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7773