This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ssh + patch + $TMP


-----UrsprÃngliche Nachricht-----
Von: Cyrille Lefevre <cyrille.lefevre-lists@laposte.net>
Gesendet: 06.03.2010 23:30:57
An: cygwin@cygwin.com,Kurt-Franke@web.de
Betreff: Re: ssh + patch + $TMP

>Hi,
>
>the attached script only fork 5 processes (ps, grep, mount, find and 
>awk), and does not use any temporary files, so, it should not degrade 
>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 take effect
in the environment of the actual shell.
every program called in such a script as subprocess must create an output file
to be sourced also from within this script to get the settings in the actual shell.

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

and, of course, not all all existing environment variables should be preserved.
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 USERDOMAIN
have the values belonging to the SYSTEM user and not the values of the actual user.
may be some others have also invalid values.
I think it is better to preserve a known list of variables and overwrite all 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]