Deleted Added
full compact
acl_common.c (191931) acl_common.c (192800)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

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

419{
420#if defined(_KERNEL)
421 kmem_free(ptr, size);
422#else
423 free(ptr);
424#endif
425}
426
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

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

419{
420#if defined(_KERNEL)
421 kmem_free(ptr, size);
422#else
423 free(ptr);
424#endif
425}
426
427#ifndef __FreeBSD__
427#if !defined(_KERNEL)
428acl_t *
429acl_alloc(enum acl_type type)
430{
431 acl_t *aclp;
432
433 if (cacl_malloc((void **)&aclp, sizeof (acl_t)) != 0)
434 return (NULL);
435

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

465
466 if (aclp->acl_aclp) {
467 acl_size = aclp->acl_cnt * aclp->acl_entry_size;
468 cacl_free(aclp->acl_aclp, acl_size);
469 }
470
471 cacl_free(aclp, sizeof (acl_t));
472}
428acl_t *
429acl_alloc(enum acl_type type)
430{
431 acl_t *aclp;
432
433 if (cacl_malloc((void **)&aclp, sizeof (acl_t)) != 0)
434 return (NULL);
435

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

465
466 if (aclp->acl_aclp) {
467 acl_size = aclp->acl_cnt * aclp->acl_entry_size;
468 cacl_free(aclp->acl_aclp, acl_size);
469 }
470
471 cacl_free(aclp, sizeof (acl_t));
472}
473#endif
474
475static uint32_t
476access_mask_set(int haswriteperm, int hasreadperm, int isowner, int isallow)
477{
478 uint32_t access_mask = 0;
479 int acl_produce;
480 int synchronize_set = 0, write_owner_set = 0;
481 int delete_set = 0, write_attrs_set = 0;

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

1722
1723#if !defined(_KERNEL)
1724 errno = error;
1725 return (-1);
1726#else
1727 return (error);
1728#endif
1729}
473
474static uint32_t
475access_mask_set(int haswriteperm, int hasreadperm, int isowner, int isallow)
476{
477 uint32_t access_mask = 0;
478 int acl_produce;
479 int synchronize_set = 0, write_owner_set = 0;
480 int delete_set = 0, write_attrs_set = 0;

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

1721
1722#if !defined(_KERNEL)
1723 errno = error;
1724 return (-1);
1725#else
1726 return (error);
1727#endif
1728}
1729#endif /* _KERNEL */