Re: LD_LIBRARY_PATH



Miner, Jonathan W (CSC) (US SSA) wrote:


-----Original Message----- From: redhat-list-bounces@xxxxxxxxxx on behalf of
Nigel Wade Sent: Thu 10/26/2006 04:44 AM To: General Red Hat Linux discussion
list Cc: Subject: Re: LD_LIBRARY_PATH

Miner, Jonathan W (CSC) (US SSA) wrote:
Hi -

I'm trying to investigate a problem that my users are having when trying to
set LD_LIBRARY_PATH in their .login files. On RHEL4u4 systems, after they
login via gdm and launch a Gnome Terminal, the LD_LIBRARY_PATH variable is
no longer set. Other variables set in their .login files are properly set.
Remote logins via telnet, rlogin, or ssh are not effected by this problem.
I've looked into other releases, and see the same behavior in FC4 and FC5,
but not in RHL9. According to the users, this problem first started earlier
this year, purhaps in March 2006.

There are workarounds:

1) Configure gnome-terminal to run as a "login shell"

2) Move LD_LIBRARY_PATH definitions into users' .cshrc files

3) Add configuration information to the /etc/ld.so.conf.d/ directory.

I'm still trying to figure out what changed to cause this to happen.


xdm/gdm use sh/bash whilst they are setting up the session. So, /etc/profile
is the place to locate system wide environment settings, and
$HOME/.bash_profile for individual settings.

It may seem strange, but the users shell setting doesn't come into it until
the user actually runs gnome-terminal, or whatever X shell they prefer. -------------------------------------------------

This is not true. The user's specified shell is envoked by the
/etc/X11/xinit/Xsession script. I did discover why LD_LIBRARY_PATH is being
dropped from the environment. The problem is that ssh-agent is sgid, and
according to the ld.so man page, LD_LIBRARY_PATH is ignored by suid/sgid
programs; not only is it ignored, it is also not passed along to child
processes either.



Ooops, yes, silly me. That'll teach me to check the setup *before* running any tests...

I was setup to use NX for login, not xdm/gdm. The way NX handles the session means that the initial user shell isn't invoked as a login shell, and it explicitly runs ~/.bash_profile before starting the session.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@xxxxxxxxxxxx
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • RE: SSH Tunneling without console login
    ... > that the command will also login onto PC2. ... > not give a shell prompt, ... I only need SSH ... > tunneling purposes, i login to the remote server ...
    (SSH)
  • Environment Poisoning and login -p
    ... login -p can be used to propagate environment flags ... in order to trojan the user shell of the target account. ... I will note that in -CURRENT, both "nologin" and /bin/sh ...
    (FreeBSD-Security)
  • Re: $PATH and /etc/profile
    ... If you run startx ... >> starting X from a login shell. ... > to detach from the console and allow you to continue working on the ... how to propery setup their shell environment. ...
    (Debian-User)
  • Re: change $PATH system-wide?
    ... Xsession script uses /bin/sh and does not know what shell you will be ... To set PATH at the graphical login you should put it in your ... environment scripts or a bug with the selected window manager. ...
    (Debian-User)
  • Re: xsession file
    ... The login managersxdm and kdm do not run a login shell, so .profile, ... In that xsession file load *the same shell* as your ...
    (Debian-User)