Victor Duchovni:
> There is a bit of pain around the ultimate location of the shared
> libraries
No kidding. It breaks our current model, which allows the user to
arbitrarily change all locations post-build (except config_directory,
which is needed to find everything else).
Thus, the location of Postfix libraries needs to be frozen in at
build time, or else it needs to be patched into the executable at
installation time. Some programs require setgid privileges so we
can't rely in production usage on LD_LIBRARY_PATH which is disgusting
anyway.
Freezing in the library location complicates testing, because every
executable must be prevented from linking against the system-installed
library.
I doubt that providing our own configurable run-time linker is an
option (i.e. symlink all commands to a stand-alone executable that
sets up an environment before running the real Postfix command, it
would not work with setgid programs anyway).
If the Postfix libraries are to be managed with the system-dependent
equivalent of ldconfig (instead of hard-wiring the path into the
executables), then we intrude on the system name space, and we must
use a globally-unique name like libpostfix instead of libutil,
libtls, libmaster, etc.
BTW I saw relative pathnames in your patches. We must avoid relative
library pathnames, otherwise our setgid commands could be exploited
with a hard-link trick.
> How aggressively do you want to pursue this?
I will consider this for 2.9. It's definitely not a good idea to
rip apart the build and install tools at the end of the 2.8 release
cycle.
It is going to be very a time-consuming process to overhaul the
build and install/update tools, and to get all the system-dependent
equivalents of SONAME, ldconfig and so on right. I don't think
that its safe to assume that all systems use the same model as
Linux.
Dynamic linking will save some disk space, but it will hardly save
memory. The processes that run in multiple instances are smtpd(8),
cleanup(8) and smtp(8). Once you have a few of those running, the
savings from dynamic linking become negligible.
Wietse