From owner-freebsd-stable@FreeBSD.ORG Mon Mar 10 16:39:44 2008 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BE331065675 for ; Mon, 10 Mar 2008 16:39:44 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id B50ED8FC1D for ; Mon, 10 Mar 2008 16:39:43 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m2AGdfns033306; Mon, 10 Mar 2008 17:39:41 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m2AGdfRu033305; Mon, 10 Mar 2008 17:39:41 +0100 (CET) (envelope-from olli) Date: Mon, 10 Mar 2008 17:39:41 +0100 (CET) Message-Id: <200803101639.m2AGdfRu033305@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, buckaroo@gmx.de In-Reply-To: <200803101543.43742.buckaroo@gmx.de> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 10 Mar 2008 17:39:42 +0100 (CET) Cc: Subject: Re: devfs ignores pass0 entry at boot time X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, buckaroo@gmx.de List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 16:39:44 -0000 Mark Nowiasz wrote: > Hah - I've found the bug! > > devfs.rules has to end with an empty line, No. It has to end with a newline, because it is a text file. In UNIX, a valid text file is a concatenation of zero or more lines, where each line *must* end with a newline, including the last line. If it doesn't, then it's not a valid text file, leading to undefined behaviour. For example, wc(1) doesn't count the last line if it's not properly terminated. Also, a shell loop (like "while read line; do") will skip such illegal lines. On the other hand, some tools accept such lines, and some even silently add a newline if one is missing (e.g. "sed valid" will add the missing newline). You should always make valid text files, so you can be sure that there won't be any problems. If you use a standard UNIX text editor such as ed or vi to create and edit text files, they will automatically make sure that every line is properly terminated, so there won't be any problem. > An entry like > > add path 'pass*' mode 660 group wheel user mark > > will be ignored, whereas > > add path 'pass*' mode 660 group wheel user mark\n > > > will be honoured. > > Well, this bug should be easy to fix There is no bug. I would expect the above behaviour. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Clear perl code is better than unclear awk code; but NOTHING comes close to unclear perl code" (taken from comp.lang.awk FAQ)