From owner-freebsd-hackers Fri Dec 5 12:44:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA06464 for hackers-outgoing; Fri, 5 Dec 1997 12:44:47 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA06453 for ; Fri, 5 Dec 1997 12:44:42 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id MAA05814; Fri, 5 Dec 1997 12:44:12 -0800 (PST) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma005812; Fri Dec 5 12:44:03 1997 Received: (from archie@localhost) by bubba.whistle.com (8.8.5/8.6.12) id MAA22727; Fri, 5 Dec 1997 12:44:03 -0800 (PST) From: Archie Cobbs Message-Id: <199712052044.MAA22727@bubba.whistle.com> Subject: Re: Teeny-weeny /usr/src/sbin/ipfw/ipfw.c patch In-Reply-To: <199712050606.WAA23987@dog.farm.org> from Dmitry Kohmanyuk at "Dec 4, 97 10:06:37 pm" To: dk+@ua.net Date: Fri, 5 Dec 1997 12:44:03 -0800 (PST) Cc: freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Dmitry Kohmanyuk writes: > > > > + if (*buf == '#') > > + continue; > > should probably become > > char *p; > if ((p = strchr(buf, '#')) != NULL) > *p = 0; > > to handle lines like > #indented comment > or > ipfw deny .... ... #end-of-line comment I almost agree with you, but not quite :-) The reason is that you never know when a # might become a valid part of an ipfw command. An an example, mpd used to do this for comments in the config files. Then somebody wanted to put a '#' in their password: set password "a&xq#53F" and suddenly they couldn't login... Not a perfect counter-example, but the idea is ... you never know. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com