DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 52SKV6h1483447 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 52SKV6h1483447 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=grgkcshx X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19C603830612 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1743193866; bh=R1fdei0cn32bfwzg4pleXkDYmnY8qY3ihntnl4R06Rg=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=grgkcshxS2wO2aQavfP+cc2JYyN8djm3aOKF+l6XpLekIe17FVukuss1s5jnbXu1/ WTHzq9wSdD/DG82VOCS9Z8zmc/oa2ChYtzOFpE8wIu/odOLdG46RKmPu9pP1PotnM4 WMDl4/71moLTOGR3zIAvQIxCXEKlGr8jaLqMXzl8= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DAD363857BA5 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DAD363857BA5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743193835; cv=none; b=LHlzZMKWvmb8mM/aWoinJ456It9OqPj+AqOxJ79PtpE6B8gmOoLHBC7MPQGO7/R8JNG3UHSkahklceU4johjW4PTMO15FlmEkDdo6pMOY5Unki1lEeW5R+nbowzdMpbi1agPfSHj0dMGqkwEaHPfZtXK6+tKJXXGXaRZyzHgvn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743193835; c=relaxed/simple; bh=i07e1Or6+KhsBVj/OxcYtn126piy/yg/ykBq2951AhE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ZEnygSHUmCzs0wSY9RVn3bGyjE2jTa0jWgKvRkHriUiL0vVn9EFX29BaOeeUrBLlZVfW7D+g8K774rBpiWgymwSUywn5tbssBXZoJZwizKpA+AEvnP/LxXfRUPyNk4YBdnFd6dkzYKnXWhDdLaOe0ov5wLJ9YzYRLuftzF1lUTo= ARC-Authentication-Results: i=1; server2.sourceware.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743193814; x=1743798614; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nHYqla348WYc2tgf/ZvwkpmoCHmIo27HttC8H0FNXCQ=; b=og7p8ly/Yl8HMDf9VZAptCoFbsH+IHbWtAQM6uxcy0dGAdyWnWejvs5Dz4LR9lzjlz t+7BrTqm1QqKKjz/c8PPQF+cS4jgO0E6uFeSviXZHUSypr7tOw11r57tyvkDJ948QGKL lA62u/j2C6GYZdi6cC1GY7dESigj3XBhMzd3YY8tx7F7WZ0aDZ7rgDikgs5kfcdEiBI1 n2Xi2LoBPVHdgKuhtdVVozcDAE2lNSjxhRhw0WL/u7DbmL3hxeeSU2+wh/4gi+viSQlE oWoIRETByr/CU+OgB/9a6c1RDAxmDML1smY2Fyd7WaHtSrGwzABYCWy8xf8IeAdmZdMk IV6w== X-Forwarded-Encrypted: i=1; AJvYcCWGfRsZ0zcZU1HOIS53IIVNU89T/4OeOW4JPyMT+luvX2JHiZhu0SnDhYUHIOguDK+pMDwRJMwz AT cygwin DOT com, AJvYcCXXEusCQCWe/+z63Yyq8rNSZWQKEkcK67wU0tNv5hOFSeWluJ2ZuODyYvIRsTDosQ835hkZWGuZSgxiS1ZR5A==@cygwin.com X-Gm-Message-State: AOJu0YzF4aKTAG1H+kQNPmYBSzy9akejlOLJMPz8HBof4hPMe2jP0mHy A+M5S/OcFJ0eBYrlywF8t51mKNcXBUrr/MiBYFzvQnvOcqz+nPapVW16HBol X-Gm-Gg: ASbGncsfLtWi491LHKqZDsiaFD8wqZp70swTlJGn768UUReAENpxOI0mBKPSK3SRoJb rGj08MohtVqA3LgW+fPYJVuFb6NX6ogkMHoiC42SqQd/D+Bxu6ONNPwtAH6gb+36W5wM63eq5rc ZmshnlE2RqSWMy8Q/yETvopDn0gy/tdF5IMfQngyV86ExScA+2HhzD2UykCgxssP96pxnmxEgJ8 z0hLxOHR+DH500sJdWRLWSZ6nv1XkEzz19MZ13V8/gvvZWlTgL0XchG3Oc5IA2llrbg9YoNBPjS prhBdqwffh+8sHVFGPOn/2lwNc/BjsWfJ1nQltKwoNo9yeJ+hkCeQk/td6e4uRW6oyY3SUz4c3i FZBLhTbzLmaYBrdlHStneuv78 X-Google-Smtp-Source: AGHT+IF+LHKOWWdUm/vgAoT75ELovEvdk4snnLO2sXNxCmW19pkDS0UGCRTjn9yiXECZ0/zaHPyXVw== X-Received: by 2002:a05:600c:1d89:b0:43c:e8ba:e166 with SMTP id 5b1f17b1804b1-43db6289c3fmr7570825e9.22.1743193814008; Fri, 28 Mar 2025 13:30:14 -0700 (PDT) Message-ID: <91c9d441-36e3-4dd5-b2ca-3cfd498d2260@draigBrady.com> Date: Fri, 28 Mar 2025 20:30:12 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: symbolic link curiousity in 3.6.0 To: Bruno Haible , Corinna Vinschen Cc: bug-gnulib AT gnu DOT org, cygwin AT cygwin DOT com, Coreutils References: <11037686 DOT 3WhfQktd6Z AT nimes> Content-Language: en-US In-Reply-To: <11037686.3WhfQktd6Z@nimes> X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?P=C3=A1draig_Brady_via_Cygwin?= Reply-To: =?UTF-8?Q?P=C3=A1draig_Brady?=

Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 28/03/2025 14:30, Bruno Haible via Gnulib discussion list wrote: > [CCing bug-gnulib] > > Corinna Vinschen wrote in > : Responding to previous messages in the above thread, I think the triggering commit in coreutils 9.6 was: https://github.com/coreutils/coreutils/commit/4ce432ad8 This displays ai->u.err on any issue getting acls etc. However in the non USE_LINUX_XATTR case in file_has_aclinfo() in gnulib we only initialize ai->u.err=ENOTSUP, but never set it otherwise. So that means in coreutils we shouldn't be inspecting u.err at all, and just printing errno like: diff --git a/src/ls.c b/src/ls.c index 244484439..46ec42037 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3549,7 +3549,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, any_has_acl |= f->acl_type != ACL_T_NONE; if (format == long_format && n < 0 && !cannot_access_acl) - error (0, ai.u.err, "%s", quotef (full_name)); + error (0, errno, "%s", quotef (full_name)); else { /* When requesting security context information, don't make Note the coreutils code seemed to always output all errors from file_has_acl(), so I'm presuming on earlier versions of coreutils we did output an ENOENT error for the dangling symlink on cygwin? That may be avoided with the adjustments discussed below. >> I found the problem, it's in a gnulib header. See below. >> ... >> Gnulib's acl-internal.h contains this: >> >> /* Linux-specific */ >> /* Cygwin >= 2.5 implements this function, but it returns 1 for all >> directories, thus is unusable. */ >> # if !defined HAVE_ACL_EXTENDED_FILE || defined __CYGWIN__ >> # undef HAVE_ACL_EXTENDED_FILE >> # define HAVE_ACL_EXTENDED_FILE false >> # define acl_extended_file(name) (-1) >> # endif >> >> This is simply not true. Cygwin's acl_extended_file only returns >> 1 on dirs, if they actually contain more than the 3 default entries >> to emulate POSIX access. I just tried it and it works exactly >> as required. >> >> Can this be fixed, please? > > If I comment out that part: > /* || defined __CYGWIN__ */ > I get three test failures > > FAIL: test-file-has-acl.sh > ========================== > > file_has_acl("tmpdir0") returned yes, expected no > FAIL test-file-has-acl.sh (exit status: 1) > > FAIL: test-file-has-acl-1.sh > ============================ > > file_has_acl("tmpdir0") returned yes, expected no > FAIL test-file-has-acl-1.sh (exit status: 1) > > FAIL: test-file-has-acl-2.sh > ============================ > > file_has_acl("tmpdir0") returned yes, expected no > FAIL test-file-has-acl-2.sh (exit status: 1) > > > from a testdir created with > $ ./gnulib-tool --create-testdir --dir=../testdir1 --single-configure acl acl-permissions file-has-acl copy-file > > This is reproducible with both Cygwin 2.9 and 3.6.0. > > So, from my point of view, the situation is still the same as when > I introduced this workaround, in > https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00089.html > > Therefore, I see two possible ways forward: > a) The Cygwin function acl_extended_file gets modified so that it > is actually usable by Gnulib (i.e. does not cause test failures), > or > b) Investigate how to deal with the "Not supported" error in coreutils. > (Maybe silence and ignore this error?) > > Bruno > > > > -- 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