Bug 32478

Summary: /etc/zshenv trashes environment
Product: [Retired] Red Hat Linux Reporter: Cameron Simpson <cs>
Component: zshAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-21 01:17:28 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 Cameron Simpson 2001-03-21 01:17:24 UTC
The /etc/zshenv file gratuitously screws around with the shell environment.
For all users it gratuitously adds some path components to the end of the
path is not present (in a very inefficient fashion, too).

Worse, if you're root it throws away any PATH setting which may have
been set up. Yea, not only for interactive shells but for all shells.
So even the trivial

	export PATH=$PATH:/opt/sbin
	zsh some-zsh-script-expecting-/opt/sbin

will fail.

This is very very bad. The zshenv file MUST NOT trash the root environment
inherited from the zsh invoker. And it's gratuitous and performance
inhibiting
to muck with the PATH on _every_ zsh start, and inefficient to do it
with greps!

Solution:
	replace the shipped /etc/zshenv with an empty file
or	don't make /etc/zshenv part of the RPM package

Comment 1 Trond Eivind Glomsrxd 2001-03-21 22:43:02 UTC
Fixed in  zsh-4.0.1-0.2pre2, which someday will show up in Rawhide - and for a
limited time at http://people.redhat.com/~teg/