Deleted Added
full compact
acl_support.c (56055) acl_support.c (56274)
1/*-
2 * Copyright (c) 1999 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/lib/libc/posix1e/acl_support.c 56055 2000-01-15 19:44:27Z rwatson $
26 * $FreeBSD: head/lib/libc/posix1e/acl_support.c 56274 2000-01-19 06:13:59Z rwatson $
27 */
28/*
29 * Support functionality for the POSIX.1e ACL interface
30 * These calls are intended only to be called within the library.
31 */
32
33#include <sys/types.h>
34#include <sys/acl.h>

--- 389 unchanged lines hidden (view full) ---

424/*
425 * Add an ACL entry without doing much checking, et al
426 */
427int
428acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id, acl_perm_t perm)
429{
430 struct acl_entry *e;
431
27 */
28/*
29 * Support functionality for the POSIX.1e ACL interface
30 * These calls are intended only to be called within the library.
31 */
32
33#include <sys/types.h>
34#include <sys/acl.h>

--- 389 unchanged lines hidden (view full) ---

424/*
425 * Add an ACL entry without doing much checking, et al
426 */
427int
428acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id, acl_perm_t perm)
429{
430 struct acl_entry *e;
431
432 if (acl->acl_cnt >= MAX_ACL_ENTRIES) {
432 if (acl->acl_cnt >= ACL_MAX_ENTRIES) {
433 errno = ENOMEM;
434 return (-1);
435 }
436
437 e = &(acl->acl_entry[acl->acl_cnt]);
438 e->ae_perm = perm;
439 e->ae_tag = tag;
440 e->ae_id = id;
441 acl->acl_cnt++;
442
443 return (0);
444}
445
446
447
448
433 errno = ENOMEM;
434 return (-1);
435 }
436
437 e = &(acl->acl_entry[acl->acl_cnt]);
438 e->ae_perm = perm;
439 e->ae_tag = tag;
440 e->ae_id = id;
441 acl->acl_cnt++;
442
443 return (0);
444}
445
446
447
448