Bug 857019 - tcsh does not init environment when run with command from su
tcsh does not init environment when run with command from su
Status: CLOSED DUPLICATE of bug 847102
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tcsh (Show other bugs)
i386 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Roman Kollár
BaseOS QE - Apps
Depends On:
  Show dependency treegraph
Reported: 2012-09-13 07:58 EDT by Tomas Dolezal
Modified: 2013-04-30 18:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-13 09:11:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomas Dolezal 2012-09-13 07:58:28 EDT
Description of problem:
tcsh does not set proper environment defined in /etc/profile.d/*.csh if run with `su -c`.

Version-Release number of selected component (if applicable):

How reproducible:
always on i386

Steps to Reproduce:
1. prepare
cat >/etc/profile.d/tcsh-test.csh <<EOF
setenv TESTVAR content
2. test
su -l -s /bin/csh -c 'echo $TESTVAR'
Actual results:
shell returns:
"TESTVAR: Undefined variable."

Expected results:
shell returns:

Additional info:
note that `echo 'echo $TESTVAR' | su -l -s /bin/csh` or just switching to csh login shell does set the environment properly
Comment 2 Roman Kollár 2012-09-13 09:11:10 EDT

*** This bug has been marked as a duplicate of bug 847102 ***

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