[ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.34-003 (Christmas/New Year release)
Wed Jan 14 11:39:00 GMT 2015
On Jan 13 14:12, cyg Simple wrote:
> > From: Corinna Vinschen
> > On Jan 13 09:37, cyg Simple wrote:
> > user's Windows default environment at the time of a user context switch (for
> > instance, logon via ssh). In that case, "leaving it as is"
> > today would mean to *drop* TMP/TEMP from the environment, because that's
> > what ssh does anyway. Ssh drops almost everything from the environment,
> > before exec'ing the child process. And that's a good thing, because the
> > environment (e.g. LOCALAPPDATA, USERPROFILE, etc) would otherwise reflect
> > the settings of the user running the sshd service, not the settings of the user just
> > logging in.
> Shouldn't these be removed during the startup of sshd? Then the child
> process would setup the variables during the login process?
That's basically what happens, except that sshd only removes the
variables when starting the child process, not at its own process
> > Having said that, TMP/TEMP have the downside of being used by POSIX and
> > Windows applications alike. Therefore these variables usually are converted
> > from Windows to POSIX and vice versa on the fly.
> This is what I was referring to earlier.
Yup, I just reiterated it to make sure the procedure is clear.
> > However, whether it makes sense to set TMP/TEMP in a ssh logon session or a
> > cron session is questionable.
> Ack. The environment tends to be empty on cron in *nix so I agree. The logon process tends to be what sets the variables, however with Cygwin sshd we need to logon to a new user; would remote desktop protocol provider API help?
It has no functions for that afaics. I'm using CreateEnvironmentBlock
to fetch the user's default Windows env and then merge it into the
environment propagated to the child process running under the user's
account. I just added code to skip all crucial variables (e.g. TMP,
TEMP, PATH) and uploaded a new snapshot with this change to
https://cygwin.com/snapshots/ I'm also going to release another
test release today.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin