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,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 CD74B2235E for ; Thu, 1 Feb 2024 15:27:17 +0100 (CET) Received: (qmail 17922 invoked by uid 550); 1 Feb 2024 14:24:47 -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 17890 invoked from network); 1 Feb 2024 14:24:46 -0000 Date: Thu, 1 Feb 2024 09:27:20 -0500 From: Rich Felker To: Andrew Cagney Cc: musl@lists.openwall.com Message-ID: <20240201142719.GV4163@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] glob(GLOB_BRACE) On Thu, Feb 01, 2024 at 08:48:01AM -0500, Andrew Cagney wrote: > FYI, It's on the BSDs and glibc. > Found by libreswan's test framework on alpine. By the usual criteria, this one probably leans towards a no, at least contingent on how constraining it is to support it. If it happened at the fnmatch layer, it would very much be a no, because that effectively imposes regex-equivalent (or at least very close) matching algorithm complexity and is thereby impossible to do efficiently in constant-space, vs the standard fnmatch language where that is possible (and we do it). For glob and GLOB_BRACE, it looks like it's "just" a matter of iterating over the different expansions and applying glob to each, but it seems to be underspecified how it interacts with escaping, special chars, slashes, etc. Do you have good reasons in favor of inclusion? My impression is that everything that wants/needs it is shipping its own version of GNU glob or whatever that has it, or else very little is using it; otherwise it would have come up before. But if adding it allowed a lot of things to drop GNU glob and just use the libc glob, that might be compelling. Rich