]> Savannah Git Hosting - gnulib.git/commitdiff
acl-permissions: Fix test-file-has-acl-2.sh failure on Cygwin.
authorBruno Haible <bruno@clisp.org>
Thu, 6 Jun 2024 05:01:00 +0000 (07:01 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 6 Jun 2024 05:01:00 +0000 (07:01 +0200)
* lib/acl-internal.c (acl_access_nontrivial): On Cygwin, ignore also
group:Users:* entries.

ChangeLog
lib/acl-internal.c

index 3c932f4f73972c95cdf45dffc1fc46687abaf4c4..d100238dbd5133aa0bea60db051e13ca7d703ded 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-06-06  Bruno Haible  <bruno@clisp.org>
+
+       acl-permissions: Fix test-file-has-acl-2.sh failure on Cygwin.
+       * lib/acl-internal.c (acl_access_nontrivial): On Cygwin, ignore also
+       group:Users:* entries.
+
 2024-06-05  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Don't perform unnecessary configure.ac scanning.
index 9ebb6e544b0936bd41aef4779caddc152a38f83b..ae5398306af2fd306b262753b76e6f22560c5b31 100644 (file)
@@ -89,6 +89,14 @@ acl_access_nontrivial (acl_t acl)
              group:Administrators:rwx
              mask::r-x
              other::r-x
+           or
+             user::rwx
+             group::r-x
+             group:SYSTEM:rwx
+             group:Administrators:rwx
+             group:Users:rwx
+             mask::rwx
+             other::r-x
          */
         case ACL_GROUP:
           {
@@ -105,9 +113,12 @@ acl_access_nontrivial (acl_t acl)
                     /* Ignore the ace if the group_sid is one of
                        - S-1-5-18 (group "SYSTEM")
                        - S-1-5-32-544 (group "Administrators")
-                       Cf. <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>  */
+                       - S-1-5-32-545 (group "Users")
+                       Cf. <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>
+                       and look at the output of the 'mkgroup' command.  */
                     ignorable = (strcmp (group_sid, "S-1-5-18") == 0
-                                 || strcmp (group_sid, "S-1-5-32-544") == 0);
+                                 || strcmp (group_sid, "S-1-5-32-544") == 0
+                                 || strcmp (group_sid, "S-1-5-32-545") == 0);
                   }
               }
             if (!ignorable)