Mail Archives: cygwin/2010/03/08/13:44:20
-----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 -