delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/08/13:44:20

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <23881903.1595996.1268073848982.JavaMail.fmail@mwmweb034>
Date: Mon, 8 Mar 2010 19:44:08 +0100 (CET)
From: Kurt Franke <Kurt-Franke AT web DOT de>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, Cyrille Lefevre <cyrille DOT lefevre-lists AT laposte DOT net>
Subject: Re: ssh + patch + $TMP
References: <1266525566 DOT 7752 DOT 1360709921 AT webmail DOT messagingengine DOT com> <loom DOT 20100219T220113-236 AT post DOT gmane DOT org> <4B806ACA DOT 2030409 AT laposte DOT net> <loom DOT 20100222T212522-331 AT post DOT gmane DOT org>, <4B92D7A1 DOT 7010603 AT laposte DOT net>
In-Reply-To: <4B92D7A1.7010603@laposte.net>
X-UI-Message-Type: mail
Sensitivity: Normal
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

-----Urspr=C3=BCngliche Nachricht-----
Von: Cyrille Lefevre <cyrille DOT lefevre-lists AT laposte DOT net>
Gesendet: 06.03.2010 23:30:57
An: cygwin AT cygwin DOT com,Kurt-Franke AT web DOT de
Betreff: Re: ssh + patch + $TMP

>Hi,
>
>the attached script only fork 5 processes (ps, grep, mount, find and=20
>awk), and does not use any temporary files, so, it should not degrade=20
>ssh logins performance.
>existing environment variables are not overwritten.
>
>Regards,
>
>Cyrille Lefevre

Hi,

it won't work this way.
a script in /etc/profile.d is sourced like the profile script itself to tak=
e effect
in the environment of the actual shell.
every program called in such a script as subprocess must create an output f=
ile
to be sourced also from within this script to get the settings in the actua=
l shell.

thus you must write the environment settings build in awk script from regis=
try to=20
a file and source it at shell level after awk script has finished.

and, of course, not all all existing environment variables should be preser=
ved.
in the special those with bad values must get a correct value.
for example TMP and TEMP have invalid values after a logon via sshd - they =
are set
to the value used by the user which is running the sshd and to the value of
the actual user.
if running with a windows version less 6.0 in a sshd session USERNAME and U=
SERDOMAIN
have the values belonging to the SYSTEM user and not the values of the actu=
al user.
may be some others have also invalid values.
I think it is better to preserve a known list of variables and overwrite al=
l others.

regards

kf

--
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