Bug 102825
Summary: | tcsh(1) sources /etc/profile.d/*.csh from the wrong file | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux Beta | Reporter: | KELEMEN Péter <peter.kelemen+rhbz> |
Component: | tcsh | Assignee: | Miloslav Trmač <mitr> |
Status: | CLOSED NOTABUG | QA Contact: | Bill Huang <bhuang> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | beta1 | CC: | notting, tao, twaugh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-08-17 23:15:47 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
KELEMEN Péter
2003-08-21 15:49:51 UTC
Additional investigation turned up /etc/bashrc, which is not a standard bash-related file, but sourced from /etc/skel/.bashrc, and therefore from the individual user's ~/.bashrc. There is indeed the snippet to source /etc/profile.d/*.sh scripts in /etc/bashrc, so in a rather ugly but existing way, profile.d parts get sourced for *every* shell invocation. NOTE to maintainer: bash 3.0 changes behaviour and sources /etc/bash.bashrc for non-login interactive shells, so you can get rid of this construct relying on user's .bashrc including the hook. Thanks, Peter Tim, comment #1 might interest you. I can't find any reference to /etc/bash.bashrc in the documentation or the binary. chihiro:/tmp% wget -q http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz chihiro:/tmp% md5sum bash-3.0.tar.gz 26c4d642e29b3533d8d754995bc277b3 bash-3.0.tar.gz chihiro:/tmp% tar zxf bash-3.0.tar.gz chihiro:/tmp% grep -r bash.bashrc bash-3.0 bash-3.0/config-top.h:/* #define SYS_BASHRC "/etc/bash.bashrc" */ chihiro:/tmp% (It's commented out) I think I must be missing the point -- how can we make use of this? Probably the /etc/bashrc owner should be cc'd. Yep, missed that. Sorry. I read the manual on a Debian system which has /etc/bash.bashrc support enabled (filed appropriate bug to document this change in the Debian man page). However, the point is that it is there in the source for a reason, even if it's uncommented. I suggest using the opportunity to clean up this mess by switching system-wide bashrc support in bash-3.0. (And while you're at it, system wide bash_logout support as well.) zsh(1) does it well for quite some time now. Which parts specifically would you move, though? |