From owner-freebsd-bugs@freebsd.org Sun Aug 9 01:13:26 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 344DE9B149E for ; Sun, 9 Aug 2015 01:13:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F14A6B36 for ; Sun, 9 Aug 2015 01:13:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t791DP0K091001 for ; Sun, 9 Aug 2015 01:13:25 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 202190] newsyslog include processing tries to parse directories as files Date: Sun, 09 Aug 2015 01:13:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: gshapiro@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2015 01:13:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202190 Bug ID: 202190 Summary: newsyslog include processing tries to parse directories as files Product: Base System Version: 10.2-STABLE Hardware: i386 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: gshapiro@FreeBSD.org Created attachment 159681 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D159681&action= =3Dedit newsyslog.c patch to skip directories for includes If a directory exists under /etc/newsyslog.conf.d/ or /usr/local/etc/newsyslog.conf.d/, newsyslog tries to parse the directory as= a file: # grep include /etc/newsyslog.conf # rotated, then the entry for that file should include the 'N' flag. /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* # ls -al /etc/newsyslog.conf.d/ total 10 drwxr-xr-x 3 root wheel 512 Aug 8 18:05 . drwxr-xr-x 25 root wheel 2560 Aug 8 10:42 .. drwxr-xr-x 2 root wheel 512 Aug 7 23:44 CVS -rw-r--r-- 1 root wheel 190 Aug 7 20:01 local.conf # /usr/sbin/newsyslog newsyslog: malformed line (missing fields): =EF=BF=BD=EF=BF=BD The attached patch skips directories when including files. If for some reason, this change isn't desirable, a workaround is to change = the default /etc/newsyslog.conf to only include configuration files instead of = all files by replacing: /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* with: /etc/newsyslog.conf.d/*.conf /usr/local/etc/newsyslog.conf.d/*.conf --=20 You are receiving this mail because: You are the assignee for the bug.=