ssh + patch + $TMP
Fri Feb 19 16:43:00 GMT 2010
On Fri, Feb 19, 2010 at 01:12:53PM +0100, Corinna Vinschen wrote:
>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
>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:
>Can we agree on that?
I guess so. On further reflection, I'd actually be happy to just
provide a POSIX-only environment and nuke things like SYSTEM* and WIN*.
But that's probably excessively mean.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin