Bug 32478 - /etc/zshenv trashes environment
Summary: /etc/zshenv trashes environment
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: zsh
Version: 7.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-21 01:17 UTC by Cameron Simpson
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-03-21 01:17:28 UTC
Embargoed:


Attachments (Terms of Use)

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/



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