Bug 857019

Summary: tcsh does not init environment when run with command from su
Product: Red Hat Enterprise Linux 6 Reporter: Tomas Dolezal <todoleza>
Component: tcshAssignee: Roman Kollár <rkollar>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-13 13:11:10 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:

Description Tomas Dolezal 2012-09-13 11:58:28 UTC
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):
tcsh-6.17-19.el6_2.i686

How reproducible:
always on i386

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

Expected results:
shell returns:
"content"

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 13:11:10 UTC

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