httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: svn commit: r1000593 - in /httpd/httpd/trunk: CHANGES server/util_script.c
Date Fri, 24 Sep 2010 10:46:16 GMT
On Thu, Sep 23, 2010 at 9:56 PM, William A. Rowe Jr. <>wrote:

> On 9/23/2010 6:58 PM, Jeff Trawick wrote:
> >
> > These two are somewhat different in practice.
> >
> > When the path to the binary is omitted on the invocation/load, the
> shell/loader/whatever finds
> >
> > * executables only because of the PATH envvar
> Correct
> > * shared libraries usually via the system search path or in the
> executable/other-library's
> > rpath
> Typically, yes
> > PATH always, LD_LIBRARY_PATH in exceptional situations
> And always permitted at the shell prior to execution.  But once httpd has
> started,
> dropping LD_LIBRARY_PATH deprives the kernel of resolving such libraries,
> due to
> our arbitrary choice to propagate PATH, but not propagate
> LD_LIBRARY_PATH... leading
> potentially to broken process invocations.  Does this make sense?
> E.g. the choice to propagate PATH, but not LD_LIBRARY_PATH, seems foolish.
>  For those
> who wish to argue the 'unsafety' of relocatable/dynamic path resolutions,
> is there
> really any difference between propagating PATH but not LD_LIBRARY_PATH?

A couple of slight exaggerations:

. almost nothing works without propagating PATH
. almost everything works without propagating LD_LIBRARY_PATH

That's the distinction.  They are used differently.  IOW, we propagate PATH
because of the gnashing of teeth which would occur otherwise.  I'm aware of
no such gnashing of teeth due to the lack of LD_LIBRARY_PATH propagation.
For those things that need LD_LIBRARY_PATH, it isn't clear to me that the
LD_LIBRARY_PATH in the shell starting httpd or in httpd's bin/envvars is the
one needed by the CGI/FastCGI.  And when somebody needs to code the
LD_LIBRARY_PATH somewhere for their CGI/FastCGI, I'd suggest that httpd.conf
is a better place than bin/envvars or somewhere in the shell used to start

Perhaps an assumption of mine that setting LD_LIBRARY_PATH or .profile is a
Bad Thing is coming into play here.  I guess if lots of tools on the system
are unusable without setting LD_LIBRARY_PATH (busted tool build or install),
then LD_LIBRARY_PATH is about as important as PATH.  That's a very bad
example IMO.

I guess I'm still at my original comment ;)  I'd like to understand more
about the CGI/FastCGI use case -- what is a real world example and why is
the shell which starts httpd or bin/envvars the natural place to set
LD_LIBRARY_PATH appropriately.  I'm not trying to scream that propagating
LD_LIBRARY_PATH is terrible; I am just hunting for the problem that this is
the best solution for. (I will save my screaming for the notion that we
propagate both or neither, if it is put into code :) )

View raw message