Home
last modified time | relevance | path

Searched refs:MAY_WRITE (Results 1 – 25 of 54) sorted by relevance

123

/linux-6.6.21/security/apparmor/include/
Dfile.h24 #define mask_mode_t(X) (X & (MAY_EXEC | MAY_WRITE | MAY_READ | MAY_APPEND))
26 #define AA_AUDIT_FILE_MASK (MAY_READ | MAY_WRITE | MAY_EXEC | MAY_APPEND |\
150 perms |= MAY_WRITE; in aa_map_file_to_perms()
154 if ((flags & O_APPEND) && (perms & MAY_WRITE)) in aa_map_file_to_perms()
155 perms = (perms & ~MAY_WRITE) | MAY_APPEND; in aa_map_file_to_perms()
158 perms |= MAY_WRITE; in aa_map_file_to_perms()
Dtask.h80 #define AA_PTRACE_TRACE MAY_WRITE
88 #define AA_SIGNAL_PERM_MASK (MAY_READ | MAY_WRITE)
Dperms.h17 #define AA_MAY_WRITE MAY_WRITE
52 #define PERMS_CHRS_MASK (MAY_READ | MAY_WRITE | AA_MAY_CREATE | \
/linux-6.6.21/security/smack/
Dsmack_lsm.c112 if (mode & MAY_WRITE) in smk_bu_mode()
208 (mode & (MAY_WRITE | MAY_APPEND))) in smk_bu_inode()
1076 rc = smk_curacc(isp, MAY_WRITE, &ad); in smack_inode_link()
1077 rc = smk_bu_inode(d_backing_inode(old_dentry), MAY_WRITE, rc); in smack_inode_link()
1082 rc = smk_curacc(isp, MAY_WRITE, &ad); in smack_inode_link()
1083 rc = smk_bu_inode(d_backing_inode(new_dentry), MAY_WRITE, rc); in smack_inode_link()
1109 rc = smk_curacc(smk_of_inode(ip), MAY_WRITE, &ad); in smack_inode_unlink()
1110 rc = smk_bu_inode(ip, MAY_WRITE, rc); in smack_inode_unlink()
1117 rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad); in smack_inode_unlink()
1118 rc = smk_bu_inode(dir, MAY_WRITE, rc); in smack_inode_unlink()
[all …]
Dsmack_access.c93 if ((may & MAY_WRITE) == MAY_WRITE) in smk_access_entry()
292 if (access & MAY_WRITE) in smack_str_from_perm()
Dsmack.h235 #define MAY_DELIVER MAY_WRITE /* Signal delivery requires write */
246 #define MAY_READWRITE (MAY_READ | MAY_WRITE)
/linux-6.6.21/security/apparmor/
Dipc.c42 if (mask & MAY_WRITE) in audit_signal_mask()
114 MAY_WRITE, &ad), in aa_may_signal()
Dlsm.c340 return common_perm_cond(OP_TRUNC, path, MAY_WRITE | AA_MAY_SETATTR); in apparmor_path_truncate()
408 MAY_READ | AA_MAY_GETATTR | MAY_WRITE | in apparmor_path_rename()
414 0, MAY_WRITE | AA_MAY_SETATTR | in apparmor_path_rename()
421 MAY_READ | AA_MAY_GETATTR | MAY_WRITE | in apparmor_path_rename()
427 0, MAY_WRITE | AA_MAY_SETATTR | in apparmor_path_rename()
544 mask |= MAY_WRITE; in apparmor_file_lock()
564 mask |= MAY_WRITE; in common_mmap()
Dtask.c197 case MAY_WRITE: in audit_ptrace_mask()
Dfile.c34 m |= MAY_WRITE; in map_mask_to_chr_mask()
652 MAY_READ | MAY_WRITE, IN_ATOMIC)) in revalidate_tty()
Dpolicy_compat.c84 if (old & MAY_WRITE) in map_old_perms()
/linux-6.6.21/include/linux/
Ddevice_cgroup.h31 if (mask & MAY_WRITE) in devcgroup_inode_permission()
/linux-6.6.21/fs/
Dxattr.c117 if (mask & MAY_WRITE) { in xattr_permission()
138 return (mask & MAY_WRITE) ? -EPERM : -ENODATA; in xattr_permission()
149 return (mask & MAY_WRITE) ? -EPERM : -ENODATA; in xattr_permission()
151 (mask & MAY_WRITE) && in xattr_permission()
283 error = xattr_permission(idmap, inode, name, MAY_WRITE); in __vfs_setxattr_locked()
542 error = xattr_permission(idmap, inode, name, MAY_WRITE); in __vfs_removexattr_locked()
Dremap_range.c113 return security_file_permission(file, write ? MAY_WRITE : MAY_READ); in remap_verify_area()
434 if (!inode_permission(idmap, inode, MAY_WRITE)) in allow_file_dedupe()
Dopen.c90 error = inode_permission(idmap, inode, MAY_WRITE); in vfs_truncate()
303 ret = security_file_permission(file, MAY_WRITE); in vfs_fallocate()
1278 if (!(acc_mode & MAY_WRITE)) in build_open_flags()
1301 acc_mode |= MAY_WRITE; in build_open_flags()
Dnamei.c414 if (!(mask & MAY_WRITE)) in generic_permission()
427 mask &= MAY_READ | MAY_WRITE | MAY_EXEC; in generic_permission()
482 if (unlikely(mask & MAY_WRITE)) { in sb_permission()
513 if (unlikely(mask & MAY_WRITE)) { in inode_permission()
1163 if (inode_permission(idmap, inode, MAY_READ | MAY_WRITE)) in safe_hardlink_source()
2970 error = inode_permission(idmap, dir, MAY_WRITE | MAY_EXEC); in may_delete()
3014 return inode_permission(idmap, dir, MAY_WRITE | MAY_EXEC); in may_create()
3240 if (acc_mode & MAY_WRITE) in may_open()
3320 MAY_WRITE | MAY_EXEC); in may_o_create()
3674 error = inode_permission(idmap, dir, MAY_WRITE | MAY_EXEC); in vfs_tmpfile()
[all …]
Dattr.c345 error = inode_permission(idmap, inode, MAY_WRITE); in may_setattr()
/linux-6.6.21/fs/gfs2/
Dinode.c364 MAY_WRITE | MAY_EXEC); in create_ok()
977 error = gfs2_permission(&nop_mnt_idmap, dir, MAY_WRITE | MAY_EXEC); in gfs2_link()
1093 MAY_WRITE | MAY_EXEC); in gfs2_unlink_ok()
1519 MAY_WRITE | MAY_EXEC); in gfs2_rename()
1556 MAY_WRITE); in gfs2_rename()
1720 MAY_WRITE); in gfs2_exchange()
1726 MAY_WRITE); in gfs2_exchange()
1891 if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode)) in gfs2_permission()
/linux-6.6.21/fs/afs/
Dsecurity.c445 if (mask & MAY_WRITE) { in afs_permission()
460 } else if (mask & MAY_WRITE) { in afs_permission()
/linux-6.6.21/mm/
Dmincore.c172 file_permission(vma->vm_file, MAY_WRITE) == 0; in can_do_mincore()
/linux-6.6.21/fs/configfs/
Dsymlink.c200 MAY_WRITE | MAY_EXEC); in configfs_symlink()
/linux-6.6.21/fs/verity/
Denable.c350 err = file_permission(filp, MAY_WRITE); in fsverity_ioctl_enable()
/linux-6.6.21/security/integrity/ima/
Dima_main.c399 if ((mask & MAY_WRITE) && test_bit(IMA_DIGSIG, &iint->atomic_flags) && in process_measurement()
558 mask & (MAY_READ | MAY_WRITE | MAY_EXEC | in ima_file_check()
/linux-6.6.21/fs/nfs/
Ddir.c3165 mask |= MAY_WRITE; in nfs_access_calc_mask()
3170 mask |= MAY_WRITE; in nfs_access_calc_mask()
3174 mask |= MAY_WRITE; in nfs_access_calc_mask()
3223 if ((mask & ~cache_mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) != 0) in nfs_do_access()
3241 mask |= MAY_WRITE; in nfs_open_permission_mask()
3279 if ((mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) in nfs_permission()
3298 if ((mask & MAY_WRITE) && !(mask & MAY_READ)) in nfs_permission()
/linux-6.6.21/fs/exfat/
Dfile.c51 if (allow_utime & MAY_WRITE) in exfat_allow_set_time()

123