Lines Matching defs:acep
510 ace_t *acep, *result = NULL;
538 acep = result;
551 acep->a_type = ACE_ACCESS_DENIED_ACE_TYPE;
552 acep->a_flags = 0;
554 acep->a_who = (uid_t)-1;
555 acep->a_flags |=
558 acep->a_who = aclent[i].a_id;
560 acep->a_who = aclent[i].a_id;
561 acep->a_flags |= ACE_IDENTIFIER_GROUP;
564 acep->a_flags |= ACE_INHERIT_ONLY_ACE |
574 acep->a_access_mask = mode_to_ace_access((mask ^ 07),
576 acep += 1;
580 acep->a_access_mask = mode_to_ace_access(aclent[i].a_perm,
585 acep->a_flags |= ACE_INHERIT_ONLY_ACE |
598 acep->a_who = (uid_t)-1;
599 acep->a_flags |= ACE_OWNER;
600 ace_make_deny(acep, acep + 1, isdir, B_TRUE);
601 acep += 2;
603 acep->a_who = aclent[i].a_id;
604 ace_make_deny(acep, acep + 1, isdir, B_FALSE);
605 acep += 2;
608 acep->a_who = (uid_t)-1;
609 acep->a_flags |= ACE_GROUP;
611 acep->a_who = aclent[i].a_id;
613 acep->a_flags |= ACE_IDENTIFIER_GROUP;
635 ace_make_deny(acep, acep + skip, isdir, B_FALSE);
637 * If we just did the last group, skip acep past
641 acep += numgroup + 1;
643 acep += 1;
645 acep->a_who = (uid_t)-1;
646 acep->a_flags |= ACE_EVERYONE;
647 ace_make_deny(acep, acep + 1, isdir, B_FALSE);
648 acep += 2;
672 ace_t *acep;
699 error = ln_aent_to_ace(aclentp, i, &acep, &acecnt, isdir);
707 if (acep) {
708 cacl_free(acep, acecnt * sizeof (ace_t));
717 acep = cacl_realloc(acep, acesz, acesz + dfacesz);
718 if (acep == NULL)
721 (void) memcpy(acep + acecnt, dfacep, dfacesz);
728 *retacep = acep;
821 access_mask_check(ace_t *acep, int mask_bit, int isowner)
828 if (acep->a_type == ACE_ACCESS_DENIED_ACE_TYPE) {
829 haswriteperm = (acep->a_access_mask & ACE_WRITE_DATA) ? 0 : 1;
830 hasreadperm = (acep->a_access_mask & ACE_READ_DATA) ? 0 : 1;
832 haswriteperm = (acep->a_access_mask & ACE_WRITE_DATA) ? 1 : 0;
833 hasreadperm = (acep->a_access_mask & ACE_READ_DATA) ? 1 : 0;
874 if ((acep->a_access_mask & mask_bit) &&
875 (acep->a_type & ACE_ACCESS_ALLOWED_ACE_TYPE)) {
900 if (acep->a_type == ACE_ACCESS_DENIED_ACE_TYPE) {
902 if (!(acep->a_access_mask & mask_bit)) {
906 if (acep->a_access_mask & mask_bit) {
913 if (!(acep->a_access_mask & mask_bit)) {
917 if (acep->a_access_mask & mask_bit) {
926 ace_to_aent_legal(ace_t *acep)
932 if ((acep->a_type != ACE_ACCESS_ALLOWED_ACE_TYPE) &&
933 (acep->a_type != ACE_ACCESS_DENIED_ACE_TYPE)) {
939 if (acep->a_flags & ~(ACE_VALID_FLAG_BITS)) {
945 if (acep->a_flags & (ACE_SUCCESSFUL_ACCESS_ACE_FLAG |
953 if (acep->a_access_mask & ~(ACE_VALID_MASK_BITS)) {
958 if ((acep->a_flags & ACE_OWNER)) {
964 error = access_mask_check(acep, ACE_SYNCHRONIZE, isowner);
968 error = access_mask_check(acep, ACE_WRITE_OWNER, isowner);
972 error = access_mask_check(acep, ACE_DELETE, isowner);
976 error = access_mask_check(acep, ACE_WRITE_ATTRIBUTES, isowner);
980 error = access_mask_check(acep, ACE_READ_NAMED_ATTRS, isowner);
984 error = access_mask_check(acep, ACE_WRITE_NAMED_ATTRS, isowner);
989 if (acep->a_type == ACE_ACCESS_ALLOWED_ACE_TYPE) {
990 if (! (acep->a_access_mask & ACE_READ_ATTRIBUTES)) {
994 if ((acep->a_access_mask & ACE_WRITE_DATA) &&
995 (! (acep->a_access_mask & ACE_APPEND_DATA))) {
999 if ((! (acep->a_access_mask & ACE_WRITE_DATA)) &&
1000 (acep->a_access_mask & ACE_APPEND_DATA)) {
1007 if ((acep->a_access_mask & ACE_READ_ACL) &&
1008 (acep->a_type != ACE_ACCESS_ALLOWED_ACE_TYPE)) {
1012 if (acep->a_access_mask & ACE_WRITE_ACL) {
1013 if ((acep->a_type == ACE_ACCESS_DENIED_ACE_TYPE) &&
1018 if ((acep->a_type == ACE_ACCESS_ALLOWED_ACE_TYPE) &&
1266 ace_t *acep;
1310 acep = &ace[i];
1313 error = ace_to_aent_legal(acep);
1321 acep->a_access_mask &= ~(ACE_WRITE_OWNER | ACE_DELETE |
1326 bits = acep->a_flags &
1343 if ((acep->a_flags & ACE_OWNER)) {
1352 } else if ((acep->a_flags & ACE_EVERYONE)) {
1357 } else if (acep->a_flags & ACE_IDENTIFIER_GROUP) {
1362 if ((acep->a_flags & ACE_GROUP)) {
1368 vals = acevals_find(acep, &acl->group,
1384 vals = acevals_find(acep, &acl->user,
1398 if (acep->a_type == ACE_ACCESS_ALLOWED_ACE_TYPE) {
1404 vals->allowed = acep->a_access_mask;
1428 vals->denied = acep->a_access_mask;
1681 ace_trivial_common(void *acep, int aclcnt,
1690 while (cookie = walk(acep, cookie, aclcnt, &flags, &type, &mask)) {
1739 ace_t *acep = datap;
1744 *flags = acep[cookie].a_flags;
1745 *type = acep[cookie].a_type;
1746 *mask = acep[cookie++].a_access_mask;
1752 ace_trivial(ace_t *acep, int aclcnt)
1754 return (ace_trivial_common(acep, aclcnt, ace_walk));