Re: logging blank usernames

From: Adrian Chadd <adrian@dont-contact.us>
Date: Mon, 28 Jul 2003 01:15:38 -0600

On Mon, Jul 28, 2003, Henrik Nordstrom wrote:

>
> Better to make accessLogFormatName return NULL on blank names I think.
> The logics in all log functions assumes NULL == unknown, and
> addressing this in accessLogFormatName would cover all bases in one
> clean go.

How about this:

accessLogFormatName(const char *name)
{
    if (NULL == name)
        return NULL;
    if (name[0] == '\0')
        return NULL;
    return username_quote(name);
}

.. ?

Adrian
Received on Mon Jul 28 2003 - 01:15:41 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:17 MST