delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/19/07:13:05

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 19 Feb 2010 13:12:53 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ssh + patch + $TMP
Message-ID: <20100219121253.GA5683@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1266525566 DOT 7752 DOT 1360709921 AT webmail DOT messagingengine DOT com> <20100218205202 DOT GY5683 AT calimero DOT vinschen DOT de> <20100218212503 DOT GA29260 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20100218212503.GA29260@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Feb 18 16:25, Christopher Faylor wrote:
> On Thu, Feb 18, 2010 at 09:52:02PM +0100, Corinna Vinschen wrote:
> >In contrast to other systems, sshd for Cygwin preserves a couple of
> >environment variables from the parent sshd process running under the
> >cyg_server account.  The list of preserved variables is:
> >
> >  ALLUSERSPROFILE
> >  COMMONPROGRAMFILES
> >  COMPUTERNAME
> >  COMSPEC
> >  CYGWIN
> >  NUMBER_OF_PROCESSORS
> >  OS
> >  PATH
> >  PATHEXT
> >  PROCESSOR_ARCHITECTURE
> >  PROCESSOR_IDENTIFIER
> >  PROCESSOR_LEVEL
> >  PROCESSOR_REVISION
> >  PROGRAMFILES
> >  SYSTEMDRIVE
> >  SYSTEMROOT
> >  TMP
> >  TEMP
> >  WINDIR
> >
> >Is it time to reduce this list?  Should sshd remove TMP and TEMP?
> >Anything else?
> 
> I'd say that it should only preserve COMSPEC, CYGWIN, SYSTEMDRIVE,
> SYSTEMROOT, WINDIR, and, I guess, PATH.  The other stuff is pretty
> useless anyway.  You can't reliably depend on, e.g., PROCESSOR_REVISION
> environment variable to be accurate any more than you can rely on email
> that says "Certified spam free" to be spam free.
> 
> I hate to see the environment polluted this way but, then, linux does
> it too.

Your's and Larry's reply follow two different ideas.  I'm still not
quite sure what to drop and what to keep.

I have a hard time to believe that anybody uses the PROCESSOR_foo stuff
in any script, so they can probably go without anybody noticing(*).

The TMP and TEMP really clash due to the user switch, so they should go.

CYGWIN is a no-brainer.

PATH is definitely necessary, as is probably SYSTEMDRIVE, SYSTEMROOT,
WINDOR, COMSPEC, and CYGWIN.

PATHEXT is used by the default COMSPEC, so I assume we should better
keep it.

ALLUSERSPROFILE, COMMONPROGRAMFILES, and PROGRAMFILES could be used in
scripts, though I don't really expect it.  Maybe in batch files.  Most
of the stuff in the *PROGRAMFILES dirs are GUI applications which are
not available anyway.  Looks not exaclty important in a ssh session.

COMPUTERNAME and OS could easily be used in scripts, but they don't
keep any information which isn't available in Cygwin by other means
(hostname, uname).  However, there are batch files...

Well, here's the revised list of what I think should be kept:

  ALLUSERSPROFILE
  COMPUTERNAME
  COMSPEC
  CYGWIN
  OS
  PATH
  PATHEXT
  SYSTEMDRIVE
  SYSTEMROOT
  WINDIR

Can we agree on that?


Thanks,
Corinna

(*) Famous last words?

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019