• Home
  • Raw
  • Download

Lines Matching refs:pace

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