Re: [AD] [LNX] environment variable for modules

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


George Foot wrote:

> Do you mean not have this ability in the 4.0 release?  I think
> it's fairly important (Allegro won't work as a normal user
> without this, unless you can disable modules) but probably not
> as important as some other stuff. :)  But perhaps we could use
> the configure prefix for this, hardcoded?  It'd be a tad messy
> though, since the configure prefix isn't used anywhere else in
> `make', only in `make install' (and it'd be nice to continue not
> having to rebuild the whole lib if you change it).

I agree it's important it works as a normal user. At work I use this
feature all the time: I can't install things as root.

> Alternatively, dlopen() is quite capable of searching the
> LD_LIBRARY_PATH, could we just use relative paths for the
> filenames?  Then it's Somebody Else's Problem if privileged
> programs can be fooled into opening non-privileged libraries --
> surely there's something already in dlopen to stop this
> happening, or I'd be able to set LD_LIBRARY_PATH and run
> sendmail, getting it to execute my dodgy code as root.

This surprises me however: are the modules looked for in /usr/lib or
/usr/local/lib independant of LD_LIBRARY_PATH and $prefix$ ? If so, I
think that should indeed be fixed. The need to set LD_LIBRARY_PATH is
not a bad thing: everyone using a home directory to install things
will probably have set a personal lib directory already. 

I can't tell right if this already works or not as the Irix version I
use at work can't compile the modules, but the following should work
for me:

$prefix = /usr/people/zelle
I have a complete bin, lib, info, man, share, etc tree residing
there. $PATH contains bin, $LD_LIBRARY_PATH contains lib, $INFOPATH
contains info and $MANPATH contains man.

'make install' should place everything in these directories, and after
that it should run without modifications :-) I can confirm that this
works for the non-module version.

Hein Zelle

>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
 Hein Zelle                     hein@xxxxxxxxxx
	                        http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/