Re: LD_LIBRARY_PATH



Neil Moore wrote:
Josh Babcock writes:

No, the variables are ok in .xsession. I put an echo statement on the line before sawfish, and it showed exactly what I had set in .profile (my .xsession sources .profile first thing anyway). Once sawfish starts up though, all it's child processes have the complete environment minus LD_LIBRARY_PATH including stuff that is only set in my .profile. I have tried substituting for the terminal program and the shell, and sawfish was the only common factor. Is it possible that something in my .sawfishrc is doing this? The string LD_LIBRARY_PATH doesn't occur in that file.


Is it possible that your window manager ends up being executed by a
setuid or setgid program?  For security reasons, the Linux dynamic
loader (and probably others) removes the LD_LIBRARY_PATH environment
variable when loading a setuid or setgid program.  ssh-agent is one
possibility.


Already checked ssh-agent, it does do this, but the problem persists when I remove ssh-agent from the invocation. sawfish is running under my own UID, so I can't see where there might be a setuid going on. X is definitely setuid root, but it isn't what calls sawfish, xinit is and xinit knows the right path, at least when .xsession is being sourced. I'm wondering now if it has to do with me using this line:
      exec /usr/bin/$wm > .${wm}.errors 2>&1
as opposed to:
      /usr/bin/$wm > .${wm}.errors 2>&1
I'm going to test that now.

Josh



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