atom feed4 messages in org.freebsd.freebsd-auditconf/51256: chkgrp should make sure t...
FromSent OnAttachments
Peter PentchevMay 27, 2003 1:45 am 
Tim RobbinsMay 27, 2003 6:55 am 
Peter PentchevMay 27, 2003 7:24 am 
Tim RobbinsJun 3, 2003 6:05 pm 
Subject:conf/51256: chkgrp should make sure the file is newline terminated
From:Peter Pentchev (ro@ringlet.net)
Date:May 27, 2003 7:24:30 am
List:org.freebsd.freebsd-audit

On Tue, May 27, 2003 at 11:55:25PM +1000, Tim Robbins wrote:

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.

Okay, this might have been a bad habit of processing files that came from Over There ;) So.. how about the patch with only the '\n' check, then?

G'luck, Peter