[GRASS5] Debian and d.m/d.zoom bug - /etc/ld.so.conf
Glynn Clements
glynn at gclements.plus.com
Thu Dec 2 05:47:11 EST 2004
Paul Kelly wrote:
> The thing is we are assuming LD_LIBRARY_PATH has been unset by the time
> grass-run.sh is run, and we need to set it again. So your change doesn't
> really make sense as on the systems that have the problem,
> $LD_LIBRARY_PATH will already be empty by that stage.
xterm isn't guaranteed to be setuid/setgid; it isn't on my system
(Gentoo). Consequently, you don't know whether LD_LIBRARY_PATH will
have been re-set in xterm.
Historically, it needed to be setuid root to set the ownership of the
pty and to update the utmp/wtmp files. Modern versions of glibc have a
setuid-root helper program (pt_chown) to deal with the pty ownership,
and the utempter library has a similar helper to deal with the
utmp/wtmp files.
> I was thinking if we
> need to pass on an already existing LD_LIBRARY_PATH, it needs to be
> evaluated before xterm is run as that is what unsets it.
Yes. One option would be to copy it to a separate variable, e.g.:
set env(saved_lib_path) $env(LD_LIBRARY_PATH)
exec xterm -e ...
and have grass-run.sh restore it from that. Although that requires the
Tcl/Tk code to know about the platform-specific variable names.
Another option would be to dump the entire environment to a file and
have grass-run.sh restore it.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list