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

Bug#355923: openssh-client: ssh-agent invocation in Xsession.d unsets TMPDIR environment variable



Package: openssh-client
Version: 1:4.2p1-5
Severity: normal
Tags: patch

Since /usr/bin/ssh-agent is setgid ssh, ld-linux removes harmful
environment variables from its environment when it is run. This has the
effect of breaking libpam-tmpdir and other methods of setting up
per-user temporary directories.

Fortunately, there is a simple fix; the attached patch uses env(1) in
the Xsession.d script to preserve the value of TMPDIR through the
invocation of ssh-agent.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (530, 'testing'), (520, 'unstable'), (510, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.15-1-k7
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages openssh-client depends on:
ii  adduser       3.63                       Add and remove users and groups
ii  debconf [debc 1.4.30.13                  Debian configuration management sy
ii  dpkg          1.13.16                    package maintenance system for Deb
ii  libc6         2.3.5-13                   GNU C Library: Shared libraries an
ii  libcomerr2    1.38+1.39-WIP-2005.12.31-1 common error description library
ii  libedit2      2.9.cvs.20050518-2.2       BSD editline and history libraries
ii  libkrb53      1.4.3-6                    MIT Kerberos runtime libraries
ii  libncurses5   5.5-1                      Shared libraries for terminal hand
ii  libselinux1   1.28-4                     SELinux shared libraries
ii  libssl0.9.8   0.9.8a-7                   SSL shared libraries
ii  zlib1g        1:1.2.2-4.sarge.2          compression library - runtime

-- no debconf information
--- /tmp/90x11-common_ssh-agent	2006-03-08 18:20:43.000000000 +0000
+++ /etc/X11/Xsession.d/90x11-common_ssh-agent	2006-03-08 18:21:09.000000000 +0000
@@ -18,7 +18,7 @@
 fi
 
 if [ -n "$STARTSSH" ]; then
-  STARTUP="$SSHAGENT $SSHAGENTARGS $STARTUP"
+  STARTUP="$SSHAGENT $SSHAGENTARGS /usr/bin/env TMPDIR=$TMPDIR $STARTUP"
 fi
 
 # vim:set ai et sts=2 sw=2 tw=80:

Reply to: