From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130171 invoked by alias); 11 Sep 2017 20:09:03 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 130160 invoked by uid 89); 11 Sep 2017 20:09:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-qk0-f173.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KZv/9ahhWTEEqAk8UX4RFr+oSXYXD2WJveD9ovvRNfc=; b=GDdQWKMvXjOVVpu9MnZCRTFQBby0YAmSrSnmfNP817WWzWCfJXzr5QC3VN7/tugKfv Fqh2OfGyx1H/ky3OSA+b247om37qm8k6rBSbbhuCM1uKVjdqLNkhwbQ7bBfrE7rMOTsc ggedIafade4TuyeSY6bE1jckBFD9isZaqj12aeVqOYrdvK25qJA8VjN8qr2ksnjKugD8 KLuW0ETSTa2bJOMy7iwM5lGfdsKRyGcEqG4zDngLx16HX8/sXgcEd7Riju7v1g7XaWhO Aebn106GrOHnMfPzNT/I9UUvZFJs2hSQ6LWlCi3OtHLvu5eeX2M/+ySOIPvZDupNSwX2 A+pw== X-Gm-Message-State: AHPjjUgFy8jBEZ+Pqdgj+sIKzpKaquPAXaKTMiZ5RXJxZc8rkQw7O6qU LARVuKZ5jZWzmU1HKkay9w== X-Google-Smtp-Source: AOwi7QDVAuz2tUWC2exo9ctn99WSZ3JmpuU7TipzQNSEQGYl+GkhtAfRmfgyd97s8xAaioeYjKwJ8Q== X-Received: by 10.55.73.213 with SMTP id w204mr17580847qka.215.1505160539757; Mon, 11 Sep 2017 13:08:59 -0700 (PDT) Subject: Re: [PATCH 3/9] posix: Allow glob to match dangling symlinks [BZ #866] To: Paul Eggert , Zack Weinberg Cc: Joseph Myers , Andreas Schwab , GNU C Library References: <1504643122-14874-1-git-send-email-adhemerval.zanella@linaro.org> <1504643122-14874-4-git-send-email-adhemerval.zanella@linaro.org> <878thop5fa.fsf@linux-m68k.org> <9455e298-8c48-c42a-0ec3-ffb8d166c69b@linaro.org> <450d2eab-f21a-f90c-6210-ea638787e339@cs.ucla.edu> <403decc7-e039-9be1-fb44-25d611540156@linaro.org> <7bf58b8a-afc9-b934-9a4a-1616e71c03ff@cs.ucla.edu> <805e4d8a-de63-5253-e214-b3912ed221e3@cs.ucla.edu> From: Adhemerval Zanella Message-ID: <30b5f782-8fb0-5b38-3b4c-6ebf435bc91c@linaro.org> Date: Mon, 11 Sep 2017 20:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <805e4d8a-de63-5253-e214-b3912ed221e3@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00464.txt.bz2 On 11/09/2017 15:03, Paul Eggert wrote: > On 09/11/2017 10:56 AM, Zack Weinberg wrote: >> So here's an alternative, less thorough but perhaps also less costly >> approach: when GLOB_ALTDIRFUNCS is set, call both gl_stat and gl_lstat >> on the first name that's going to be returned, even if we have no >> other reason to do this. > Something like that would be better, yes. Still not sure it's worth the trouble. We don't know how expensive gl_stat and gl_lstat will be, in general. Another approach that does not involve adding compat symbols (which adds a lot of code complexity inside glibc build and do not solve 'make' builds against new glibc) would to make GLOB_ALTDIRFUNCS to follow the old semantic of using gl_stat instead of gl_lstat while making glob without GLOB_ALTDIRFUNCS works as intended. And add another flag, GLOB_ALTDIRFUNCS2, which actually uses gl_lstat. It will solve make compat issue even for build against newer glibcs with the cost of making GLOB_ALTDIRFUNCS with a slight different semantic than default glob (which given the current situation is a feasible cost).