]> Savannah Git Hosting - gnulib.git/commitdiff
acl-permissions: Fix build on Solaris and Cygwin
authorAndreas Gruenbacher <andreas.gruenbacher@gmail.com>
Fri, 29 May 2015 17:47:40 +0000 (19:47 +0200)
committerAndreas Gruenbacher <andreas.gruenbacher@gmail.com>
Fri, 29 May 2015 17:57:56 +0000 (19:57 +0200)
Reported by Tom G. Christensen <tgc@jupiterrise.com>:
* lib/set-permissions.c (set_acls): The count, entries, ace_count, and
ace_entries variables have moved into struct permission_context but
they were still accessed as local variables here.

ChangeLog
lib/set-permissions.c

index 82abe7f8a3d31a6fe74f110f11fb6701d987eb88..fb8b44677e4b4b0472ae0828b590ce0c379b174a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-05-29  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
+
+       acl-permissions: Fix build on Solaris and Cygwin
+       Reported by Tom G. Christensen <tgc@jupiterrise.com>:
+       * lib/set-permissions.c (set_acls): The count, entries, ace_count, and
+       ace_entries variables have moved into struct permission_context but
+       they were still accessed as local variables here.
+
 2015-05-29  Pádraig Brady  <P@draigBrady.com>
 
        linkat: avoid OS X 10.10 trailing slash with symlink bug
index 47cb91ca162f6cf63358fa7605a8630f7c63804d..db3696c56023895fb8e07b3bacc4bb35a469e00f 100644 (file)
@@ -611,13 +611,13 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
   if (ret == 0 && ctx->count)
     {
       if (desc != -1)
-       ret = facl (desc, SETACL, count, entries);
+       ret = facl (desc, SETACL, ctx->count, ctx->entries);
       else
-       ret = acl (name, SETACL, count, entries);
+       ret = acl (name, SETACL, ctx->count, ctx->entries);
       if (ret < 0)
        {
          if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-             && acl_nontrivial (count, entries) == 0)
+             && acl_nontrivial (ctx->count, ctx->entries) == 0)
            ret = 0;
        }
       else
@@ -628,13 +628,13 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
   if (ret == 0 && ctx->ace_count)
     {
       if (desc != -1)
-       ret = facl (desc, ACE_SETACL, ace_count, ace_entries);
+       ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
       else
-       ret = acl (name, ACE_SETACL, ace_count, ace_entries);
+       ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
       if (ret < 0)
        {
          if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
-             && acl_ace_nontrivial (ace_count, ace_entries) == 0)
+             && acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0)
            ret = 0;
        }
       else