unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
To: bug-gnulib@gnu.org, 20681@debbugs.gnu.org
Subject: bug#20681: [PATCH] acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)
Date: Fri, 29 May 2015 21:06:08 +0200	[thread overview]
Message-ID: <1432926368-5092-1-git-send-email-andreas.gruenbacher__21262.7084031285$1432926494$gmane$org@gmail.com> (raw)
In-Reply-To: <55689A39.7080804@cs.ucla.edu>

* lib/set-permissions.c (set_acls): Fix more errors introduced in the acl
module rewrite.
---
 ChangeLog             |  4 ++++
 lib/set-permissions.c | 13 +++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fb8b446..a44510a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-05-29  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
 
+	acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)
+	* lib/set-permissions.c (set_acls): Fix more errors introduced in the acl
+	module rewrite.
+
 	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
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index db3696c..ba291f3 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -566,7 +566,7 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
 	{
 	  acl_free (acl);
 
-	  acl = acl_init (acl);
+	  acl = acl_init (0);
 	  if (acl)
 	    {
 	      if (HAVE_ACL_SET_FD && desc != -1)
@@ -582,12 +582,13 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
   else
     {
       if (HAVE_ACL_SET_FD && desc != -1)
-	ret = acl_set_fd (desc, acl);
+	ret = acl_set_fd (desc, ctx->acl);
       else
-	ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
+	ret = acl_set_file (name, ACL_TYPE_EXTENDED, ctx->acl);
       if (ret != 0)
 	{
-	  if (! acl_errno_valid (saved_errno) && ! acl_extended_nontrivial (acl))
+	  if (! acl_errno_valid (errno)
+	      && ! acl_extended_nontrivial (ctx->acl))
 	    ret = 0;
 	}
     }
@@ -696,9 +697,9 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
   if (ret == 0 && ctx->have_u)
     {
       if (desc != -1)
-	ret = fchacl (desc, &u.a, u.a.acl_len);
+	ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
       else
-	ret = chacl (name, &u.a, u.a.acl_len);
+	ret = chacl (name, &ctx->u.a, ctx->u.a.acl_len);
       if (ret < 0)
 	{
 	  if (errno == ENOSYS && from_mode)
-- 
2.4.0






  reply	other threads:[~2015-05-29 19:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 12:55 bug#20681: Build failure [MSYS2/MINGW64, OSX] Angelo Graziosi
2015-05-28 17:47 ` Eli Zaretskii
2015-05-29 12:27   ` Angelo Graziosi
2015-05-29 16:56     ` Paul Eggert
2015-05-29 19:06       ` Andreas Gruenbacher [this message]
2015-05-29 19:09       ` Andreas Grünbacher
2015-05-29 19:45         ` Paul Eggert
2015-05-29 19:56           ` Nick Andryshak
2015-05-29 19:57             ` Andreas Grünbacher
2015-05-30 10:22               ` Eli Zaretskii
2015-05-30 12:02                 ` Andreas Grünbacher
2015-05-30 12:10                   ` Eli Zaretskii
2015-05-30 13:06                     ` Andreas Grünbacher
2015-05-31 14:29                       ` Eli Zaretskii
2015-05-31 19:18                         ` Andreas Grünbacher
2015-06-01 15:05                           ` Eli Zaretskii
2015-06-01 16:18                             ` Andreas Grünbacher
2015-06-01 17:39                               ` Eli Zaretskii
2015-06-01 18:41                                 ` Andreas Grünbacher
2015-06-01 19:01                                   ` Eli Zaretskii
2015-05-29 21:49           ` Angelo Graziosi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='1432926368-5092-1-git-send-email-andreas.gruenbacher__21262.7084031285$1432926494$gmane$org@gmail.com' \
    --to=andreas.gruenbacher@gmail.com \
    --cc=20681@debbugs.gnu.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).