Bug 2019874 - tcsh sets variable p to /usr/sbin from /etc/csh.login
Summary: tcsh sets variable p to /usr/sbin from /etc/csh.login
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: 36
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Martin Osvald 🛹
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1945400 2066767
TreeView+ depends on / blocked
 
Reported: 2021-11-03 14:19 UTC by Martin Osvald 🛹
Modified: 2022-05-24 02:43 UTC (History)
4 users (show)

Fixed In Version: setup-2.13.10-1.fc36 setup-2.13.10-1.fc35
Clone Of:
Environment:
Last Closed: 2022-05-12 01:12:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Osvald 🛹 2021-11-03 14:19:50 UTC
This bug was initially created as a copy of Bug #1945400

I am copying this bug because: 

This problem happens on Fedora also, let's fix it in Rawhide first before fixing it in RHEL8.


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 1 Ben Cotton 2022-02-08 21:34:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 3 Martin Osvald 🛹 2022-05-07 14:55:48 UTC
The fix is in git:

https://pagure.io/setup/c/e189898849b92d9ddf7070c5d5da0c7856ade4a4?branch=master

Comment 4 Fedora Update System 2022-05-08 08:45:50 UTC
FEDORA-2022-13c2b1e6db has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-13c2b1e6db

Comment 5 Fedora Update System 2022-05-08 08:56:52 UTC
FEDORA-2022-d37f9b1e8b has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d37f9b1e8b

Comment 6 Fedora Update System 2022-05-09 02:04:55 UTC
FEDORA-2022-d37f9b1e8b has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-d37f9b1e8b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-d37f9b1e8b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-05-09 02:54:59 UTC
FEDORA-2022-13c2b1e6db has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-13c2b1e6db`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-13c2b1e6db

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-05-12 01:12:56 UTC
FEDORA-2022-13c2b1e6db has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2022-05-24 02:43:45 UTC
FEDORA-2022-d37f9b1e8b has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


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