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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marc MERLIN
Dátum:  
Címzett: Peter Benie
CC: exim-users
Régi témák: Re: [Exim] Re: request for version 4.10 (local_scan)
Tárgy: Re: [Exim] Re: request for version 4.10 (local_scan)
On Thu, Jul 11, 2002 at 06:48:32PM +0100, Peter Benie wrote:
> > As you can see, though, I (well, David really) have already written
> > the local_scan that does all the dlopen stuff. All that remains is
> > copying it to your source tree :-).
>
> Please don't copy this patch in its current form. It has a few weaknesses:
>
> 1) It casts pointer to object into pointer to function
> This means that it can't be implemented on architectures where
> these types have different widths. (Very many programs that use
> dlsym make this error.) Instead, dlsym should be used to retrieve a
> method table containing the functions exported by the library.
>
> 2) It's overly restrictive about the way it handles the ABI version.
> local_scan_version_fn should be given a minimum and maxiumum version
> supported by the caller so it pick a version with which it is happy.
>
> 3) It doesn't check the return value of malloc.
>
> 4) I think that it leaks memory, but exim's documentation of
> local_scan isn't very clear about who owns the memory in *return_text.
> Using store_get avoids the issue.
>
> 5) If the symbol, local_scan, is exists but is NULL, dlerror gets
> called anyway. (This is unlikely to cause problems in practice.)
>
> 6) dlerror should be called when dlopen fails.


So, in the meantime, I'm still bundling this patch with sa-exim, and I
barely have the time to maintain my debian exim package and sa-exim, so
I don't really have the time to work on this.
Has anyone made an improved version of the patch?

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger marc_f@??? for PGP key