Bug 217783 - LD_LIBRARY_PATH stripped when xdm login ( personal )
LD_LIBRARY_PATH stripped when xdm login ( personal )
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xorg-x11-xinit (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Søren Sandmann Pedersen
Depends On: 208148
Blocks: 246139 296411
  Show dependency treegraph
Reported: 2006-11-29 16:59 EST by ritz
Modified: 2014-06-18 05:09 EDT (History)
4 users (show)

See Also:
Fixed In Version: RHBA-2007-1046
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-28 14:32:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (3.40 KB, patch)
2007-02-21 06:17 EST, ritz
no flags Details | Diff

  None (edit)
Description ritz 2006-11-29 16:59:26 EST
+++ This bug was initially created as a clone of Bug #208148 +++

Description of problem:

This is a dup of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=164869.

I am entering it again now as it is in RHEL4.4

In /etc/X11/xdm/Xsession, the addition of $SSH_AGENT in the following line:
     exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH gnome-session"

The ssh-agent executable is has its setgid bit set; this causes glibc (?) to
remove LD_LIBRARY_PATH from the environment before launching $DBUS_LAUNCH

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Login via xdm
2. Open gnome-terminal
Actual results:
<It's Empty!>

Expected results:
Anything you have set in ~/.bash_profile or /etc/profile

Additional info:
Login via a console (ctrl-alt-F1); echo $LD_LIBRARY_PATH:  Viola,

-- Additional comment from mcepl@redhat.com on 2006-11-24 11:45 EST --
According to the tmraz (owner of ssh-agent) there will be no chance of changing
ssh-agent being sgid, so probably the only solution is to follow comment 4 and
change (if possible) calling of ssh-agent (unless we want WONTFIX, but that's
IMHO not correct, because this really looks like our bug). Therefore, I think,
that this bug belongs to you. Feel free to reASSIGN to somebody better.

-- Additional comment from mcepl@redhat.com on 2006-11-24 11:47 EST --
see for more info FC bug#164869.


-- Additional comment from rkhadgar@redhat.com on 2006-11-29 15:47 EST --
additionally, rhel3 do not have setuid ssh-agent . rhel4 and above do.
Comment 1 ritz 2007-01-26 04:44:51 EST
patch posted on bug#164869
Comment 2 ritz 2007-02-21 06:17:16 EST
Created attachment 148472 [details]
proposed patch

A wrapper script to start desktop session and saving LD_LIBRARY_PATH .
To apply the patch

cd /
touch etc/X11/xinit/xinitrc-ssh
cat /path/to/xinitrc_ld_library_path_rhel5.patch| patch -p0
chmod a+x /etc/X11/xinit/xinitrc-ssh

log-out and login. This should resolve the issue.
Comment 3 ritz 2007-02-26 07:14:48 EST
works for the customer.
Comment 4 ritz 2007-02-26 07:22:51 EST
additional note:
kde does not export bashrc during login. checking this up.
workaround is to use profile.d , or $HOME/.xsession 
Comment 5 Ray Strode [halfline] 2007-02-27 18:11:14 EST
We should probably just change ssh-agent to use its alternate syntax instead of
doing the pass through way we do now.
Comment 6 ritz 2007-08-10 15:35:24 EDT
patch from bugzilla #164869 [1]  helps.

[1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=164869#c36
Comment 7 Daniel Riek 2007-10-04 12:33:32 EDT
Correcting component to xorg-x11-xinit
Comment 8 Søren Sandmann Pedersen 2007-10-04 12:35:17 EDT
Devel ack. Fastrack is fine with me.
Comment 13 errata-xmlrpc 2007-11-28 14:32:00 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.