[Exim] Re: request for version 4.10 (local_scan)

Pàgina inicial
Delete this message
Reply to this message
Autor: Derrick 'dman' Hudson
Data:  
A: exim-users
Assumptes nous: [Exim] Offtopic: XFree86 modules and local_scan
Assumpte: [Exim] Re: request for version 4.10 (local_scan)
--
On Sun, Jul 14, 2002 at 08:48:45AM +0100, Dr Andrew C Aitchison wrote:
| > | On Fri, 12 Jul 2002, David Woodhouse wrote:
| > | > Indeed. Actually the ABI is a whole can of worms all on its
| > | > own -- as soon as we build Exim with -rdynamic we start
| > | > exporting all kinds of internal functions which Philip may
| > | > want to change and/or remove at any time.

|
| Derrick 'dman' Hudson replied:
| > How is that any different than it is now? Someone can make a
| > local_scan that includes exim.h and calls functions that you haven't
| > explicitly allowed. (in fact, the dlopen patch from David does that
| > to get at the local_scan_module setting)

|
| The difference is that currently rewriting local_scan means
| recompiling the exim binary.


Yes.

| Having to compile both things in step does eliminate many
| incompatibilities.


It does ensure that the same compiler on the same system was used for
both.

I was asking about the mention that compiling with -rdynamic will
expose internal functions for external use. My assertion is that,
regardless of the compile options, the local_scan _can_ access any
function in exim, regardless of whether or not Philip approves.

A well behaved module will only use the functions which Philip
documented as the interface available to the local_scan function. A
poorly behaved module will be subject to arbitrary "breakage" when
the internal function(s) change. The compiler will warn of such
problems only if the signature of the function changes. If only the
semantics change, then the incompatibility is likely to go unnoticed
until it breaks badly on someone's system.

| One aim of dlopen would be to allow *binaries* of exim and different
| local_scan functions to be released separately.


Yes, that is the aim. The other benefit of that is being able to use
a scanner while still using the ready-made package from my distro.

| When that works people are going to try to run, say Marc Merlin's
| Spam Assasin local_scan binary, with the Debian exim binary, and
| then wonder why it doesn't work when they upgrade one half.


The ABI version checking should take care of that, and report in the
log why it didn't work.

Ideally, the 'exim' package would include the dynamic loading code.
Marc's scanner would be provided in a 'exim-sa' package. The
'exim-sa' package would "Depend:" on a specific version of exim (or a
range of compatible versions). apt/dpkg would then keep the two in
sync and the end admin wouldn't have to worry about that. The same
would go for an 'exim-exiscan' package, and every other (packaged)
scanner.

| Worse they are going to try to use it with a Red Hat exim binary
| (it is all Linux isn't it ?), or a version of debian with a different
| glibc.


So? That's their problem. I can do the same thing right now wrt to
the whole exim binary. That's just one of the joys of dynamic linking
in C :-). Still, Philip doesn't compile exim statically and release
just the binary (which would never have binary incompatibilities with
other libs).

| I don't understand the details, and it is probably worse when device
| drivers are involved, but XFree86 doesn't use dlopen, but has its
| own module loading system which doesn't even allow the driver direct
| access to libc and other libraries (which does have the advantage
| that the device driver *binaries* are operating system neutral*).


Interesting. So the X folks created their own 'ld' and 'libc' for the
the modules to use? Or do X drivers not need anything from libc in
the first place?

| Dynamically loadable modules should be thought through carefully by
| someone who knows what they are doing, and not rushed.


Sure. David was the first person to speak up who already has a clue
as to what he's doing. He provided the initial code. I've learned
from it (but am by no means an expert), and am using it right now.
Since that time, no one has provided any feedback on the quality of
the code, until I asked Philip if he would include it in 4.10. Now
I'm getting lots of feedback! (which is a Good Thing)


Rather than reply to this message, please continue the discussion in
the thread with the subject "local_scan interface discussion".

-D

--
Who can say, "I have kept my heart pure;
I am clean and without sin"?
        Proverbs 20:9


http://dman.ddts.net/~dman/
--
[ Content of type application/pgp-signature deleted ]
--