Lines Matching refs:pace
544 const ACCESS_ALLOWED_ACE *pace;
560 pace = (const ACCESS_ALLOWED_ACE*)
562 acesz = le16_to_cpu(pace->size);
563 switch (pace->type) {
566 wantsz = ntfs_sid_size(&pace->sid) + 8;
568 || !ntfs_valid_sid(&pace->sid)
580 wantsz = ntfs_sid_size(&pace->sid) + 8;
582 || !ntfs_valid_sid(&pace->sid)
1088 struct POSIX_ACE *pace;
1094 pace = &pxdesc->acl.ace[i];
1095 tagsset |= pace->tag;
1096 switch(pace->tag) {
1098 mode |= (pace->perms & 7) << 6;
1102 mode = (mode & 07707) | ((pace->perms & 7) << 3);
1105 mode |= pace->perms & 7;
1205 struct POSIX_ACE *pace;
1211 pace = &pxdesc->acl.ace[i];
1212 switch(pace->tag) {
1214 pace->perms = (mode >> 6) & 7;
1219 pace->perms = (mode >> 3) & 7;
1223 pace->perms = (mode >> 3) & 7;
1227 pace->perms = mode & 7;
3197 const ACCESS_ALLOWED_ACE *pace;
3222 pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace];
3223 if (!(pace->flags & INHERIT_ONLY_ACE)) {
3224 if (ntfs_same_sid(usid, &pace->sid)
3225 || ntfs_same_sid(ownersid, &pace->sid)) {
3227 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3228 allowown |= pace->mask;
3229 else if (pace->type == ACCESS_DENIED_ACE_TYPE)
3230 denyown |= pace->mask;
3232 if (ntfs_same_sid(gsid, &pace->sid)
3233 && !(pace->mask & WRITE_OWNER)) {
3234 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3235 allowgrp |= pace->mask;
3236 else if (pace->type == ACCESS_DENIED_ACE_TYPE)
3237 denygrp |= pace->mask;
3239 if (is_world_sid((const SID*)&pace->sid)) {
3240 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3241 allowall |= pace->mask;
3243 if (pace->type == ACCESS_DENIED_ACE_TYPE)
3244 denyall |= pace->mask;
3246 if ((ntfs_same_sid((const SID*)&pace->sid,nullsid))
3247 && (pace->type == ACCESS_ALLOWED_ACE_TYPE))
3248 special |= pace->mask;
3250 offace += le16_to_cpu(pace->size);
3285 const ACCESS_ALLOWED_ACE *pace;
3312 pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace];
3313 if (!(pace->flags & INHERIT_ONLY_ACE)) {
3314 if ((ntfs_same_sid(usid, &pace->sid)
3315 || ntfs_same_sid(ownersid, &pace->sid))
3316 && (pace->mask & WRITE_OWNER)) {
3317 if (pace->type == ACCESS_ALLOWED_ACE_TYPE) {
3318 allowown |= pace->mask;
3322 if (ntfs_same_sid(usid, &pace->sid)
3323 && (!(pace->mask & WRITE_OWNER))) {
3324 if (pace->type == ACCESS_ALLOWED_ACE_TYPE) {
3325 allowgrp |= pace->mask;
3329 if (is_world_sid((const SID*)&pace->sid)) {
3330 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3331 allowall |= pace->mask;
3333 if (pace->type == ACCESS_DENIED_ACE_TYPE)
3334 denyall |= pace->mask;
3336 if ((ntfs_same_sid((const SID*)&pace->sid,nullsid))
3337 && (pace->type == ACCESS_ALLOWED_ACE_TYPE))
3338 special |= pace->mask;
3340 offace += le16_to_cpu(pace->size);
3475 const ACCESS_ALLOWED_ACE *pace;
3502 pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace];
3503 if (!(pace->flags & INHERIT_ONLY_ACE)
3504 && !(~pace->mask & (ROOT_OWNER_UNMARK | ROOT_GROUP_UNMARK))) {
3505 if ((ntfs_same_sid(usid, &pace->sid)
3506 || ntfs_same_sid(ownersid, &pace->sid))
3507 && (((pace->mask & WRITE_OWNER) && firstapply))) {
3508 if (pace->type == ACCESS_ALLOWED_ACE_TYPE) {
3509 allowown |= pace->mask;
3512 if (pace->type == ACCESS_DENIED_ACE_TYPE)
3513 denyown |= pace->mask;
3515 if (ntfs_same_sid(gsid, &pace->sid)
3516 && (!(pace->mask & WRITE_OWNER))) {
3517 if (pace->type == ACCESS_ALLOWED_ACE_TYPE) {
3518 allowgrp |= pace->mask;
3521 if (pace->type == ACCESS_DENIED_ACE_TYPE)
3522 denygrp |= pace->mask;
3523 } else if (is_world_sid((const SID*)&pace->sid)) {
3524 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3525 allowall |= pace->mask;
3527 if (pace->type == ACCESS_DENIED_ACE_TYPE)
3528 denyall |= pace->mask;
3532 if (!(pace->flags & INHERIT_ONLY_ACE))
3533 if ((ntfs_same_sid((const SID*)&pace->sid,nullsid))
3534 && (pace->type == ACCESS_ALLOWED_ACE_TYPE))
3535 special |= pace->mask;
3536 offace += le16_to_cpu(pace->size);
3569 const ACCESS_ALLOWED_ACE *pace;
3585 pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace];
3586 if ((pace->mask & WRITE_OWNER)
3587 && (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3588 && ntfs_is_user_sid(&pace->sid))
3590 offace += le16_to_cpu(pace->size);
3594 usid = &pace->sid;
3624 const ACCESS_ALLOWED_ACE *pace;
3642 pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace];
3643 if ((pace->type == ACCESS_ALLOWED_ACE_TYPE)
3644 && (pace->mask & DIR_WRITE)) {
3645 xid = ntfs_find_user(mapping[MAPUSERS], &pace->sid);
3648 offace += le16_to_cpu(pace->size);
3676 const ACCESS_ALLOWED_ACE *pace;
3742 pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace];
3743 if (pace->flags & INHERIT_ONLY_ACE) {
3754 if ((~pace->mask & (ROOT_OWNER_UNMARK | ROOT_GROUP_UNMARK))
3755 && (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3756 && ntfs_same_sid(&pace->sid, adminsid)) {
3757 pxace->tag = (pace->mask & ROOT_OWNER_UNMARK ? POSIX_ACL_GROUP : POSIX_ACL_USER);
3759 if ((pace->mask & (GENERIC_ALL | WRITE_OWNER))
3760 && (pace->flags & INHERIT_ONLY_ACE))
3763 if (ntfs_same_sid(usid, &pace->sid)) {
3772 if (!(pace->mask & (WRITE_OWNER | GENERIC_ALL))
3773 && (pace->type == ACCESS_ALLOWED_ACE_TYPE)) {
3778 if (ntfs_same_sid(&pace->sid,usid))
3780 gid = ntfs_find_group(mapping[MAPGROUPS],&pace->sid);
3786 uid = ntfs_find_user(mapping[MAPUSERS],&pace->sid);
3799 if ((pace->type == ACCESS_DENIED_ACE_TYPE)
3800 && (pace->mask & WRITE_OWNER)) {
3806 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3809 uid = ntfs_find_user(mapping[MAPUSERS],&pace->sid);
3816 if (pace->flags & INHERIT_ONLY_ACE) {
3817 if ((firstinh && ntfs_same_sid(&pace->sid,adminsid))
3818 || ntfs_same_sid(&pace->sid,systemsid))
3824 if ((adminowns && ntfs_same_sid(&pace->sid,adminsid))
3825 || ntfs_same_sid(&pace->sid,systemsid))
3832 } else if (ntfs_same_sid(gsid, &pace->sid)) {
3833 if ((pace->type == ACCESS_DENIED_ACE_TYPE)
3834 && (pace->mask & WRITE_OWNER)) {
3841 gid = ntfs_find_group(mapping[MAPGROUPS],&pace->sid);
3851 if (pace->type == ACCESS_ALLOWED_ACE_TYPE)
3857 if (pace->mask & (WRITE_OWNER | GENERIC_ALL))
3865 } else if (is_world_sid((const SID*)&pace->sid)) {
3868 if ((pace->type == ACCESS_DENIED_ACE_TYPE)
3869 && (pace->flags & INHERIT_ONLY_ACE))
3871 } else if (ntfs_same_sid((const SID*)&pace->sid,nullsid)) {
3875 uid = ntfs_find_user(mapping[MAPUSERS],&pace->sid);
3877 if ((pace->type == ACCESS_DENIED_ACE_TYPE)
3878 && (pace->mask & WRITE_OWNER)
3888 gid = ntfs_find_group(mapping[MAPGROUPS],&pace->sid);
3890 if ((pace->type == ACCESS_DENIED_ACE_TYPE)
3891 && (pace->mask & WRITE_OWNER)
3910 if (((pace->type == ACCESS_ALLOWED_ACE_TYPE)
3911 || (pace->type == ACCESS_DENIED_ACE_TYPE))
3916 if (pace->mask & FILE_APPEND_DATA)
3918 if (pace->mask & FILE_WRITE_DATA)
3920 if (pace->mask & FILE_READ_DATA)
3924 if (pace->mask & DIR_GEXEC)
3926 if (pace->mask & DIR_GWRITE)
3928 if (pace->mask & DIR_GREAD)
3930 if ((pace->mask & GENERIC_ALL)
3931 && (pace->flags & INHERIT_ONLY_ACE))
3936 if (pace->mask & FILE_GEXEC)
3938 if (pace->mask & FILE_GWRITE)
3940 if (pace->mask & FILE_GREAD)
3944 if (pace->type != ACCESS_ALLOWED_ACE_TYPE)
3950 if (pace->flags & INHERIT_ONLY_ACE) {
3956 offace += le16_to_cpu(pace->size);