Detail file reader header detection sucks

Alan DeKok aland at
Sun Aug 9 10:14:14 CEST 2009

Arran Cudbard-Bell wrote:
> src/modules/frs_detail/frs_detail.c
> This'd be fine, except the format of the detail file header is user
> definable!

  Sure... for use *other* than with the detail file reader.

> Wouldn't it be safer to just assume that the first line that
> doesn't start with a \t is the header?

  Maybe.  Unless the detail file is corrupted somehow.

> if (data->state == STATE_HEADER &&
>     (buffer[0] != '\t')) {
>     continue;
> }
> It's not like the detail file listener actually does anything with the
> data from the record header.

  Well, yes.

  Alan DeKok.

More information about the Freeradius-Devel mailing list