Environment passing in Solaris 8 with later versions of SSH a nd U seLogin=yes

Roberts-Thomson, James James.Roberts-Thomson at NBNZ.CO.NZ
Mon Sep 29 12:48:49 EST 2003


>IIRC some platforms like the environment passed as arguments to 
>/bin/login rather than as traditional environment strings. What does 
>login's manpage say?

     login [ -p ]  [ -d device ]  [ -h hostname | [ terminal ]  |
     -r hostname ]  [   name  [ environ ]  ...  ]


The environment may be expanded  or  modified  by  supplying
additional  arguments  to login, either at execution time or
when login requests your login name. The arguments may  take
either  the  form  xxx  or  xxx=yyy.


Alternatively, you can pass the current environment by  sup-
plying  the  -p  flag to login. This flag indicates that all
currently defined environment variables should be passed, if
possible,  to  the  new  environment

Basically, I can supply environment options, but passing "-p" should "just

>If this is the case, it wouldn't be too change the invocation of login 
>to pass them. We already have code to manage argument lists (used by scp 
>and sftp).

Well, the execl function call to call login is identical in both versions
("working" and "nonworking"), so I doubt that is the issue.  I'm not sure if
I can fudge the calls to supply env variables on the command line, but could
give it a try...

James Roberts-Thomson
Senior Systems Engineer	DDI +64 4 494 4436
Infrastructure Projects	Tel +64 4 494 4000
The National Bank of New Zealand Limited	Fax +64 4 802 8509
If at first you do succeed, try to hide your astonishment.

This communication is confidential and may contain privileged material.
If you are not the intended recipient you must not use, disclose, copy or retain it.
If you have received it in error please immediately notify me by return email
and delete the emails.
Thank you.

More information about the openssh-unix-dev mailing list