Bug 217783 - LD_LIBRARY_PATH stripped when xdm login ( personal )
Summary: LD_LIBRARY_PATH stripped when xdm login ( personal )
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xorg-x11-xinit
Version: 5.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Søren Sandmann Pedersen
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On: 208148
Blocks: 246139 296411
TreeView+ depends on / blocked
 
Reported: 2006-11-29 21:59 UTC by ritz
Modified: 2018-10-19 22:53 UTC (History)
4 users (show)

Fixed In Version: RHBA-2007-1046
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-28 19:32:00 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:1046 0 normal SHIPPED_LIVE xorg-x11-xinit bug fix update 2007-11-28 19:31:57 UTC

Description ritz 2006-11-29 21:59:26 UTC
+++ 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
gnome-session.

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

How reproducible:


Steps to Reproduce:
1. Login via xdm
2. Open gnome-terminal
3. echo $LD_LIBRARY_PATH
  
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,
LD_LIBRARY_PATH is set.

-- Additional comment from mcepl 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 on 2006-11-24 11:47 EST --
see for more info FC bug#164869.

...

-- Additional comment from rkhadgar 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 09:44:51 UTC
patch posted on bug#164869

Comment 2 ritz 2007-02-21 11:17:16 UTC
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 12:14:48 UTC
works for the customer.

Comment 4 ritz 2007-02-26 12:22:51 UTC
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 23:11:14 UTC
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 19:35:24 UTC
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 16:33:32 UTC
Correcting component to xorg-x11-xinit

Comment 8 Søren Sandmann Pedersen 2007-10-04 16:35:17 UTC
Devel ack. Fastrack is fine with me.

Comment 13 errata-xmlrpc 2007-11-28 19:32:00 UTC
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.

http://rhn.redhat.com/errata/RHBA-2007-1046.html



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