]>
git.saurik.com Git - apple/libc.git/blob - posix1e/acl.c
2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #include <sys/appleapiopts.h>
25 #include <sys/types.h>
38 if (!_ACL_VALID_ACL(acl
)) {
43 if ((ap
= malloc(sizeof(*ap
))) != NULL
)
44 bcopy(acl
, ap
, sizeof(*ap
));
52 * Without tracking the addresses of text buffers and qualifiers,
53 * we can't validate the obj argument here at all.
69 if (count
> ACL_MAX_ENTRIES
) {
74 if ((ap
= malloc(sizeof (*ap
))) != NULL
) {
75 bzero(ap
, sizeof(*ap
));
76 ap
->a_magic
= _ACL_ACL_MAGIC
;
85 _ACL_VALIDATE_ACL(acl
);
92 acl_valid_fd_np(int fd
, acl_type_t type
, acl_t acl
)
94 errno
= ENOTSUP
; /* XXX */
99 acl_valid_file_np(const char *path
, acl_type_t type
, acl_t acl
)
101 errno
= ENOTSUP
; /* XXX */
106 acl_valid_link(const char *path
, acl_type_t type
, acl_t acl
)
108 errno
= ENOTSUP
; /* XXX */
113 * Not applicable; not supportedl
116 acl_calc_mask(__unused acl_t
*acl_p
)