]>
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>
39 if (!_ACL_VALID_ACL(acl
)) {
44 if ((ap
= malloc(sizeof(*ap
))) != NULL
)
45 bcopy(acl
, ap
, sizeof(*ap
));
53 * Without tracking the addresses of text buffers and qualifiers,
54 * we can't validate the obj argument here at all.
56 if(obj
!= _FILESEC_REMOVE_ACL
)
71 if (count
> ACL_MAX_ENTRIES
) {
76 if ((ap
= malloc(sizeof (*ap
))) != NULL
) {
77 bzero(ap
, sizeof(*ap
));
78 ap
->a_magic
= _ACL_ACL_MAGIC
;
87 _ACL_VALIDATE_ACL(acl
);
94 acl_valid_fd_np(int fd
, acl_type_t type
, acl_t acl
)
96 errno
= ENOTSUP
; /* XXX */
101 acl_valid_file_np(const char *path
, acl_type_t type
, acl_t acl
)
103 errno
= ENOTSUP
; /* XXX */
108 acl_valid_link(const char *path
, acl_type_t type
, acl_t acl
)
110 errno
= ENOTSUP
; /* XXX */
115 * Not applicable; not supportedl
118 acl_calc_mask(__unused acl_t
*acl_p
)