Re: [EXIM] using DRAC with exim

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Olaf Titz
Datum:  
To: exim-users
Betreff: Re: [EXIM] using DRAC with exim
> A further modification did the trick. The structure holding the string to
> use as a key also has a size attribute, which I suppose must be use when
> the key is inserted into the file. Ordinarily drac sets this as being the
> length of the string using strlen - of course strlen only measures up to
> the first null byte in a string. Incrementing this size field by one,
> though probably inadvisable, did the trick, and hosts that have logged in
> can now relay as required. Unfortunately this appears to have had the side
> effect of making drac not expire entries on cue anymore. This is another


The traditional dbm API deals with "datums" as binary blocks represented
as pointer/length pairs, not as C strings. The length attribute has to
be stored in the dbm file anyway, so the proper representation for
string-formed data should be without the trailing nul. The proper fix
IMHO would be to change the dbm reading routine in exim to add the nul
byte or otherwise ensure a cap on string length. (Note that this also
has to do with avoiding crashes on malformed dbm data.) This doesn't
affect compatibility with dbm files generated by other tools which do
add the nul, since a double nul at the end of a string is simply ignored.

Olaf


--
*** Exim information can be found at http://www.exim.org/ ***