#17 Incorrect environment variables

open
nobody
None
5
2012-07-18
2006-03-30
Peter Darton
No

I'm running on Windows Server 2003-r2.

I've got PrivilegeSeperation enabled (by following the
instructions on
http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/)
I can log in either using a password or using a key
(I've disabled StrictModes).

If I do "plink myputtysessionname" I get an interactive
session on the server in which all the environment
variables seem to be set correctly (although the cursor
keys, backspace keys etc don't work well).

If I do "plink myputtysessionname command arguments"
then the command "command" gets run on the the server
with the arguments "arguments".
However, the command "command" gets run with the wrong
environment variables set - it's got the environment
variables from my "sshd" user (which is the user that
runs the SSH service), not the user specified in
myputtysessionname.

As a result of this, if one logs in for an interactive
session and types "cvs server", cvs runs and says hello.
If one does "plink myputtysessionname cvs server" I get
an error about cvs not being permitted to create
temporary files in ...\Documents and Settings\sshd\Local...

Now, I'm sure I could make a work-around by writing a
script called "cvs", putting it into the cygwin bin
directory and making it do "CMD /C cvs server" instead,
thus starting up a new environment for the cvs command
to run in, but I shouldn't have to do that.

Discussion


Anonymous


Cancel   Add attachments