conf/51256: chkgrp should make sure the file is newline
terminated
Tim Robbins
tjr at FreeBSD.ORG
Tue May 27 06:55:49 PDT 2003
On Tue, May 27, 2003 at 11:42:42AM +0300, Peter Pentchev wrote:
> Could somebody take a look at this PR and the patch (quoted below), and
> see if there's anything wrong with it or it may be committed?
[...]
> > if ((line = fgetln(gf, &len)) == NULL)
> > break;
> > + if (len > 0 && line[len - 1] != '\n' && line[len - 1] != '\r') {
> > + warnx("%s: line %d: no newline character", gfn, n);
> > + e++;
> > + }
[...]
I think that it's unnecessary (and incorrect) to check for a '\r' character
at the end of the line.
Tim
More information about the freebsd-audit
mailing list