diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-02-16 14:42:43 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-02-16 14:42:43 +0000 |
commit | 974ab3dd887985e3aa347f3c6521f819296396a0 (patch) | |
tree | 802fb82c9f8ec8acd7a60fba7824c2df6f0073ad /lib/set-mode-acl.c | |
parent | 8e7ba70eba02f88d4f3ba12e07ab9c7bdf32240a (diff) | |
download | coreutils-974ab3dd887985e3aa347f3c6521f819296396a0.tar.gz |
Imported Upstream version 8.21upstream/8.21
Diffstat (limited to 'lib/set-mode-acl.c')
-rw-r--r-- | lib/set-mode-acl.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/set-mode-acl.c b/lib/set-mode-acl.c index 25a1eeee..35fe2a81 100644 --- a/lib/set-mode-acl.c +++ b/lib/set-mode-acl.c @@ -1,6 +1,6 @@ /* set-mode-acl.c - set access control list equivalent to a mode - Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ #include <config.h> +#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE + #include "acl.h" #include "acl-internal.h" @@ -56,7 +58,7 @@ qset_acl (char const *name, int desc, mode_t mode) #if USE_ACL # if HAVE_ACL_GET_FILE /* POSIX 1003.1e draft 17 (abandoned) specific version. */ - /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */ + /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */ # if !HAVE_ACL_TYPE_EXTENDED /* Linux, FreeBSD, IRIX, Tru64 */ @@ -141,19 +143,19 @@ qset_acl (char const *name, int desc, mode_t mode) return 0; # else /* HAVE_ACL_TYPE_EXTENDED */ - /* MacOS X */ + /* Mac OS X */ - /* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS) - and acl_get_file (name, ACL_TYPE_DEFAULT) + /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS) + and acl_get_file (name, ACL_TYPE_DEFAULT) always return NULL / EINVAL. You have to use - acl_get_file (name, ACL_TYPE_EXTENDED) - or acl_get_fd (open (name, ...)) + acl_get_file (name, ACL_TYPE_EXTENDED) + or acl_get_fd (open (name, ...)) to retrieve an ACL. On the other hand, - acl_set_file (name, ACL_TYPE_ACCESS, acl) - and acl_set_file (name, ACL_TYPE_DEFAULT, acl) + acl_set_file (name, ACL_TYPE_ACCESS, acl) + and acl_set_file (name, ACL_TYPE_DEFAULT, acl) have the same effect as - acl_set_file (name, ACL_TYPE_EXTENDED, acl): + acl_set_file (name, ACL_TYPE_EXTENDED, acl): Each of these calls sets the file's ACL. */ acl_t acl; |