AIX reading /etc/environment out of step.

Sandor W. Sklar ssklar at stanford.edu
Wed Jan 23 06:08:06 EST 2002


At 12:09 PM -0600 1/22/02, <mouring at etoh.eviladmin.org> wrote:
>I was discussing with Don about a private topic..and while skimming the
>code I noticed that during a 'ssh mouring at site ls'  the /etc/environment
>is *ONLY* read if the remote machine is an AIX box.  This is undocumented
>and I'm wondering if someone using AIX could explain WHY it exists in the
>session.c:do_child()?  No other OS has this.  I don't see why AIX should
>require it.
>
>Can someone JUSTIFY this to me the fact we are going against our own
>documentation for a single platform?

I can't justify it to you, or speak to the behavior on other 
platforms, but on AIX, /etc/environment is supposed to be read for 
*every* process's environment.  Again, I don't know much about other 
platforms, if it is not read on AIX, then the process will have no 
concept of the standard variables whose values would be assumed, 
i.e., "TZ", "LANG", "LOCPATH", "NLSPATH", and perhaps most important, 
"ODMDIR".

How other OSes deal with those items is something I don't know anything about.

In short, I don't know if it is considered "correct" or not, based on 
the OpenSSH documentation, but I suspect that if it is changed, AIX 
will break and the word will end.


 From the "environment" manpage ...

environment File

Purpose

Sets up the user environment.

Description

The /etc/environment file contains variables specifying the basic environment
for all processes. When a new process begins, the exec subroutine 
makes an array
of strings available that have the form Name=Value. This array of strings is
called the environment. Each name defined by one of the strings is called an
environment variable or shell variable. The exec subroutine allows the entire
environment to be set at one time.

-- 
   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   Sandor W. Sklar  -  Unix Systems Administrator  -  Stanford University ITSS
   Non impediti ratione cogitationis.   <http://whippet.stanford.edu/~ssklar/>
   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the openssh-unix-dev mailing list