Passing PROCESSOR_ARCHITECTURE env var from Cygwin sshd into my ssh session.

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Mon Dec 17 19:05:00 GMT 2012


On 12/15/2012 4:43 PM, Oleksandr Gavenko wrote:
> I setup VirtualBox and Windows in it and setup sshd under Cygwin.
>
> Further development I perform in original Debian distro from ssh+Emacs+Cygwin.
>
> I need to compile a project with native Scons+MSVC. To do this I installed
> appropriated software and wrote batch-file wrapper (which setup PATH and other
> vars).
>
> Scons script fail at code that check PROCESSOR_ARCHITECTURE env var.
>
> "set | grep PROCESSOR" is empty in my ssh session!
>
> As workaround I just set this variable at my batch-file wrapper.
>
> But I don't understand why this env var was not set. While many other
> variables are set (like WINDIR, SYSTEMROOT, PROGRAMFILES).
>
> Is that a bug?

No, it's a feature and a security one at that.  Exposing allot of
environment variables through sshd is a security hole.  To plug it, only
the minimum environment needed is provided.  You can add to that with
external scripts of your own.

> How to make this variable be passed into my ssh session permanently but
> without editing .bashrc?

I'd recommend a separate script that you can run after you login by
some convenient means of your own choosing.  This keeps it from
cluttering up your .bashrc file.  But that's just a suggestion.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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



More information about the Cygwin mailing list