On Mon, Jan 30, 2006 at 04:29:42PM -0500, Chansup Byun wrote:
> Hi,
> 
> I am using OpenSSH 4.2p1.
> 
> I need to make sshd process to inherit some environment variables (EVs) 
> from its parent process.
> It looks like sshd process only inherits a limited number of EVs:  HOME, 
> LOGNAME, MAIL, PATH,PWD,SHELL,SSH_CLIENT,SSH_CONNECTION,TZ, and USER.
> 
> Is it possible to make the child sshd process inherit some EVs from its 
> parent process?  Those EVs are dynamically set after submitting a job.

One way is to modify sshd: add a another child_set_env() to
session.c:do_setup_env()

If you're using PAM, you could have a (session?) module push the
environment variable into the PAM environemnt, from where it should be
picked up by sshd.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Reply via email to