[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
acl: simplification
From: |
Bruno Haible |
Subject: |
acl: simplification |
Date: |
Sun, 8 Jun 2008 04:39:14 +0200 |
User-agent: |
KMail/1.5.4 |
In the MacOS X case, we need to create an empty acl_t object. This simplifies
the code for doing that, so that we don't need to know about the (very
platform dependent) textual representation.
2008-06-07 Bruno Haible <address@hidden>
* lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(),
to construct an empty ACL.
*** lib/set-mode-acl.c.orig 2008-06-08 04:35:46.000000000 +0200
--- lib/set-mode-acl.c 2008-06-08 04:35:27.000000000 +0200
***************
*** 153,165 ****
acl = acl_get_file (name, ACL_TYPE_ACCESS);
if (acl)
{
! # if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP /* MacOS X */
! static const char empty_acl_text[] = "!#acl 1\n";
! # else /* Unknown flavor of POSIX-like ACLs */
! # error Unknown flavor of POSIX-like ACLs - add support for your platform.
! # endif
!
! acl = acl_from_text (empty_acl_text);
if (acl)
{
if (HAVE_ACL_SET_FD && desc != -1)
--- 153,159 ----
acl = acl_get_file (name, ACL_TYPE_ACCESS);
if (acl)
{
! acl = acl_init (0);
if (acl)
{
if (HAVE_ACL_SET_FD && desc != -1)
- acl: simplification,
Bruno Haible <=