From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 7B3F325A61 for ; Sat, 22 Jun 2024 03:06:14 +0200 (CEST) Received: (qmail 28480 invoked by uid 550); 22 Jun 2024 01:06:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28437 invoked from network); 22 Jun 2024 01:06:08 -0000 Date: Fri, 21 Jun 2024 21:06:25 -0400 From: Rich Felker To: Collin Funk Cc: Leah Neukirchen , musl@lists.openwall.com Message-ID: <20240622010625.GD10433@brightrain.aerifal.cx> References: <625e06f9-10ca-4ad3-86e2-6f6edf585ec9@gmail.com> <20240523132117.GZ10433@brightrain.aerifal.cx> <87pltc63rt.fsf@vuxu.org> <20240523144744.GA10433@brightrain.aerifal.cx> <20240523152733.GB10433@brightrain.aerifal.cx> <7389f0ee-aa40-471a-8aab-dd01cc6885bf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7389f0ee-aa40-471a-8aab-dd01cc6885bf@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] getusershell should ignore comments and empty lines. On Fri, May 24, 2024 at 05:16:41PM -0700, Collin Funk wrote: > Hi Rich, > > On 5/23/24 8:27 AM, Rich Felker wrote: > >> In general, musl policy is to support at most what's consistent > >> between historical implementations. > >> > >> It seems like they all ignore lines that start with a '#'. They might > >> (not clear from the above) also ignore blank lines. > >> > >> The minimal change both to avoid clashing with vaguely reasonable > >> things user might want to put there (and violating least surprise), > >> and to support the common behavior, seems to be just looping as long > >> as the line is empty or starts with #. > > > > Something like this? > > Thanks for explaining how Musl handles things. > > I haven't tested your patch but it looks correct. Applied. Let me know if anything seems wrong still.