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 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, Cyrille Lefevre Subject: Re: ssh + patch + $TMP References: <1266525566 DOT 7752 DOT 1360709921 AT webmail DOT messagingengine DOT com> <4B806ACA DOT 2030409 AT laposte DOT net> , <4B92D7A1 DOT 7010603 AT laposte DOT net> In-Reply-To: <4B92D7A1.7010603@laposte.net> X-UI-Message-Type: mail Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sensitivity: Normal Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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