delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/04/09/07:10:19

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 539BAIld2680394
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 539BAIld2680394
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=BCByZ62l
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 928B2384A80B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1744197017;
bh=Cq+AOcGnbv43RZGIr1T8h0XZG2UuxX8P21/a1tjyqmk=;
h=Date:To:Cc:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=BCByZ62lFACByQt8poG2d8JpiTCtiRsN/iRBnm+s/qGJxTLNwwXGae6cL+CranyiM
4yckVmMWwQ/88L9S07Pp+dArjevojAqsmUzLip1gZMa6pHMkgtIQ7FdXh5Fuhg8XF7
eixBpKkVjhl5xSN/m8U/ykJ+epaLRJN4lZ4hXvLg=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDFC2385841F
Date: Wed, 9 Apr 2025 13:09:13 +0200
To: Bruno Haible <bruno AT clisp DOT org>
Cc: bug-gnulib AT gnu DOT org, cygwin AT cygwin DOT com
Subject: Re: symbolic link curiousity in 3.6.0
Message-ID: <Z_ZVWZNxBO6WB2m4@calimero.vinschen.de>
Mail-Followup-To: Bruno Haible <bruno AT clisp DOT org>, bug-gnulib AT gnu DOT org,
cygwin AT cygwin DOT com
References: <Pine DOT BSF DOT 4 DOT 63 DOT 2503250218240 DOT 74063 AT m0 DOT truegem DOT net>
<7892953 DOT SKYDtnEIZr AT nimes> <Z-fjk7zghYvvNGW4 AT calimero DOT vinschen DOT de>
<2351191 DOT D4D8VRik6i AT nimes>
MIME-Version: 1.0
In-Reply-To: <2351191.D4D8VRik6i@nimes>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 539BAIld2680394

Hi Bruno,

On Mar 29 15:02, Bruno Haible via Cygwin wrote:
> Corinna Vinschen wrote:
> > > Regarding what acl_extended_file() does, there is the man page by
> > > Andreas Grünbacher:
> > > https://www.kernel.org/doc/man-pages/online/pages/man3/acl_extended_file.3.html
> > > Gnulib is not the only user of acl_extended_file(); therefore I would
> > > suggest that Cygwin should follow that man page — regardless of Gnulib.
> > 
> > It already does!  The acl_extended_file() change for directories we just
> > talked about will actually be a deviation from Andreas' man page.
> 
> OK, then Cygwin's acl_extended_file should not change.
> 
> > > An ACL implementation that shows a '+' sign on 99.9% of the files is
> > > not useful. A user can't practically run 'getfacl' on all files and
> > > understand the result. In other words, ACLs need to be the special case,
> > > not the common case.
> > 
> > Yeah, that's a good point.  If the user is beaten with a stick with
> > a '+' sign written on it, it's basically no help.
> 
> Glad to have an agreement here. Then, gnulib won't change: it will not
> use Cygwin's acl_extended_file() function and instead use the function
> acl_access_nontrivial(), defined in Gnulib.

Actually, after having some time to think more about this, I disagree.

First of all, Cygwin provides the acl_extended_file() function and it's
doing the POSIXly correct thing.

Second, your code mixes Windows and POSIX points of view as to what
constitutes a extended vs. trivial ACL.  However, Cygwin is
*deliberatly* using the POSIX point of view and *deliberatly*
providing the user with the POSIX POV.

Third, the filtering of Administrator and SYSTEM GROUP entries is
already performed by Cygwin itself.  Your code is duplicating what
Cygwin does and only adds a test for the Users group, which is
kinda questionable.
If we decide to change the ACL functions to ignore, for example, the
Domain Users group to evaluate an ACL for triviality, this would not be
reflected by ls(1), which is IMHO not a good thing.  And if we did that
accidentally, due to a bug, it might even be covered by ls(1), which is
even worse.

If you create a native Windows version, it's ok to check the ACL inside
gnulib, because there's no such thing as a Windows function returning a
triviality indicator.  But Cygwin is *not* Windows, it's POSIX on
Windows.  And it has a matching function.

Forth, by not trusting Cygwin to do the right thing and adding a lot
of unnecessary code for each single ACL, you slow down ls(1) even more
on Cygwin, which already gets a beating for being slow.

I think it would be nice if you would accept how we do things and
why we do things.  Gnulib supports the target system and fills the gaps
where the target system is lacking, and I'm very grateful for gnulib.
But I'm not talking about bugs here, rather about what we think is right
or wrong.  And in this case, I think we're doing the right thing, and
gnulib "knows better" and is trampling over it.

Therefore I would like to ask you to reconsider and to remove the
Cygwin-special code and let Cygwin decide by itself, what a trivial vs.
non-trivial ACL is by using the POSIXy functions Cygwin provides.
Just use acl_extended_file(), please.


Thanks,
Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019