[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#573325: openssh-client: ssh-agent strips LD_LIBRARY_PATH from user profile in X sessions

Package: x11-common
Version: 1:7.5+8
File: /etc/X11/Xsession.d/90x11-common_ssh-agent

/etc/X11/Xsession.d/90x11-common_ssh-agent nowadays saves and
restores TMPDIR:


Please consider tunneling LD_LIBRARY_PATH in the same way.
Until then, I've added a similar hack in ~/.xsessionrc.

I spent half an hour searching for what deleted the variable
(and now more complaining about it...).  It's documented in
/usr/share/doc/openssh-client/README.Debian.gz (since bug
#167974), but I didn't originally know ssh-agent was the cause,
so didn't look there.  Perhaps this should be mentioned in
Xsession(5) as well?

Also, I think the problem could be fixed with two executables.
A not-setgid wrapper would create a pipe and fork.  The child
process would write all of its environment variables to the pipe
and exit.  The parent process would exec the setgid ssh-agent and
tell it the file descriptor of the pipe.  The setgid ssh-agent
would lose some environment variables on startup but read them
all back from the pipe and eventually pass them to execle().

Attachment: pgp2lHeeFmqV0.pgp
Description: PGP signature

Reply to: