[Mimedefang] Small logging bug in mimedefang.c

Clayton, Nik [IT] nik.clayton at citigroup.com
Thu Jan 23 06:06:01 EST 2003


How do,

There's a small logging bug in mimedefang.c in versions 2.16 to 2.29 as
far as I can tell.

At various points in mimedefang.c there's code that looks like this:

    snprintf(buf2, SMALLBUF, "%s/FOO", buffer);
    if ((test-to-make-sure-the-file-was-created-and-read)) {
        syslog(LOG_WARNING, "Could not create %s: %m", buffer);
        /* some more cleanup */
 
        return SMFIS_TEMPFAIL;
    }

Searching for 'Could not create' in mimedefang.c should turn up all
instances of it[1].

Anyway, in the syslog(...) line, shouldn't 'buffer' be 'buf2', to log the
name of the file that had the problem, rather than just the directory?

N

[1] Conceivably enough instances that this should be factored out in to 
    a separate function[2]

[2] Code would be provided, except for $employer's concern over IP...
-- 
1        1         2         3         4         5         6         7    7
         0         0         0         0         0         0         0    5
  -- The 75 column-ometer
                                             Contributing to the heat death
Global Messaging, 120 Cheapside, x83331      of the universe since 1973.



More information about the MIMEDefang mailing list