/security/keys/ |
D | permission.c | 30 key_perm_t kperm, mask; in key_task_permission() local 43 case KEY_NEED_VIEW: mask = KEY_OTH_VIEW; break; in key_task_permission() 44 case KEY_NEED_READ: mask = KEY_OTH_READ; break; in key_task_permission() 45 case KEY_NEED_WRITE: mask = KEY_OTH_WRITE; break; in key_task_permission() 46 case KEY_NEED_SEARCH: mask = KEY_OTH_SEARCH; break; in key_task_permission() 47 case KEY_NEED_LINK: mask = KEY_OTH_LINK; break; in key_task_permission() 48 case KEY_NEED_SETATTR: mask = KEY_OTH_SETATTR; break; in key_task_permission() 85 if ((kperm & mask) != mask) in key_task_permission()
|
/security/apparmor/ |
D | resource.c | 86 if (profile->rlimits.mask & (1 << resource) && new_rlim->rlim_max > in profile_setrlimit() 143 unsigned int mask = 0; in __aa_transition_rlimits() local 155 if (old->rlimits.mask) { in __aa_transition_rlimits() 158 for (j = 0, mask = 1; j < RLIM_NLIMITS; j++, in __aa_transition_rlimits() 159 mask <<= 1) { in __aa_transition_rlimits() 160 if (old->rlimits.mask & mask) { in __aa_transition_rlimits() 174 if (!new->rlimits.mask) in __aa_transition_rlimits() 176 for (j = 0, mask = 1; j < RLIM_NLIMITS; j++, mask <<= 1) { in __aa_transition_rlimits() 177 if (!(new->rlimits.mask & mask)) in __aa_transition_rlimits()
|
D | lib.c | 203 void aa_perm_mask_to_str(char *str, size_t str_size, const char *chrs, u32 mask) in aa_perm_mask_to_str() argument 209 if (mask & perm) { in aa_perm_mask_to_str() 222 u32 mask) in aa_audit_perm_names() argument 229 if (mask & perm) { in aa_audit_perm_names() 239 void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs, in aa_audit_perm_mask() argument 245 if ((mask & chrsmask) && chrs) { in aa_audit_perm_mask() 246 aa_perm_mask_to_str(str, sizeof(str), chrs, mask & chrsmask); in aa_audit_perm_mask() 247 mask &= ~chrsmask; in aa_audit_perm_mask() 249 if (mask & namesmask) in aa_audit_perm_mask() 252 if ((mask & namesmask) && names) in aa_audit_perm_mask() [all …]
|
D | ipc.c | 38 static const char *audit_signal_mask(u32 mask) in audit_signal_mask() argument 40 if (mask & MAY_READ) in audit_signal_mask() 42 if (mask & MAY_WRITE) in audit_signal_mask()
|
D | lsm.c | 203 static int common_perm(const char *op, const struct path *path, u32 mask, in common_perm() argument 211 error = aa_path_perm(op, label, path, 0, mask, cond); in common_perm() 225 static int common_perm_cond(const char *op, const struct path *path, u32 mask) in common_perm_cond() argument 236 return common_perm(op, path, mask, &cond); in common_perm_cond() 250 struct dentry *dentry, u32 mask, in common_perm_dir_dentry() argument 255 return common_perm(op, &path, mask, cond); in common_perm_dir_dentry() 268 struct dentry *dentry, u32 mask) in common_perm_rm() argument 280 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_rm() 294 struct dentry *dentry, u32 mask, umode_t mode) in common_perm_create() argument 301 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_create() [all …]
|
D | file.c | 27 static u32 map_mask_to_chr_mask(u32 mask) in map_mask_to_chr_mask() argument 29 u32 m = mask & PERMS_CHRS_MASK; in map_mask_to_chr_mask() 31 if (mask & AA_MAY_GETATTR) in map_mask_to_chr_mask() 33 if (mask & (AA_MAY_SETATTR | AA_MAY_CHMOD | AA_MAY_CHOWN)) in map_mask_to_chr_mask() 111 u32 mask = perms->audit; in aa_audit_file() local 114 mask = 0xffff; in aa_audit_file() 117 aad(&sa)->request &= mask; in aa_audit_file()
|
D | policy.c | 722 int aa_may_manage_policy(struct aa_label *label, struct aa_ns *ns, u32 mask) in aa_may_manage_policy() argument 726 if (mask & AA_MAY_REMOVE_POLICY) in aa_may_manage_policy() 728 else if (mask & AA_MAY_REPLACE_POLICY) in aa_may_manage_policy() 899 u32 mask, struct aa_loaddata *udata) in aa_replace_profiles() argument 909 op = mask & AA_MAY_REPLACE_POLICY ? OP_PROF_REPL : OP_PROF_LOAD; in aa_replace_profiles() 978 !(mask & AA_MAY_REPLACE_POLICY), in aa_replace_profiles() 985 !(mask & AA_MAY_REPLACE_POLICY), in aa_replace_profiles()
|
D | task.c | 192 static const char *audit_ptrace_mask(u32 mask) in audit_ptrace_mask() argument 194 switch (mask) { in audit_ptrace_mask()
|
D | mount.c | 140 u32 mask = perms->audit; in audit_mount() local 143 mask = 0xffff; in audit_mount() 146 request &= mask; in audit_mount()
|
D | apparmorfs.c | 414 static ssize_t policy_update(u32 mask, const char __user *buf, size_t size, in policy_update() argument 426 error = aa_may_manage_policy(label, ns, mask); in policy_update() 433 error = aa_replace_profiles(ns, label, mask, data); in policy_update() 583 __poll_t mask = 0; in ns_revision_poll() local 589 mask |= EPOLLIN | EPOLLRDNORM; in ns_revision_poll() 593 return mask; in ns_revision_poll()
|
/security/apparmor/include/ |
D | file.h | 114 static inline u16 dfa_map_xindex(u16 mask) in dfa_map_xindex() argument 116 u16 old_index = (mask >> 10) & 0xf; in dfa_map_xindex() 119 if (mask & 0x100) in dfa_map_xindex() 121 if (mask & 0x200) in dfa_map_xindex() 123 if (mask & 0x80) in dfa_map_xindex()
|
D | perms.h | 137 u32 mask); 139 u32 mask); 140 void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
|
D | resource.h | 29 unsigned int mask; member
|
D | policy.h | 197 u32 mask, struct aa_loaddata *udata); 311 u32 mask);
|
/security/integrity/ima/ |
D | ima_policy.c | 79 int mask; member 142 {.action = MEASURE, .func = MMAP_CHECK, .mask = MAY_EXEC, 144 {.action = MEASURE, .func = BPRM_CHECK, .mask = MAY_EXEC, 146 {.action = MEASURE, .func = FILE_CHECK, .mask = MAY_READ, 154 {.action = MEASURE, .func = MMAP_CHECK, .mask = MAY_EXEC, 156 {.action = MEASURE, .func = BPRM_CHECK, .mask = MAY_EXEC, 158 {.action = MEASURE, .func = FILE_CHECK, .mask = MAY_READ, 161 {.action = MEASURE, .func = FILE_CHECK, .mask = MAY_READ, 544 u32 secid, enum ima_hooks func, int mask, in ima_match_rules() argument 566 (rule->mask != mask && func != POST_SETATTR)) in ima_match_rules() [all …]
|
D | ima.h | 258 const struct cred *cred, u32 secid, int mask, 262 int ima_must_measure(struct inode *inode, int mask, enum ima_hooks func); 290 int mask, int flags, int *pcr, 322 int mask, enum ima_hooks func); 350 struct inode *inode, int mask, in ima_must_appraise() argument
|
D | ima_appraise.c | 74 int mask, enum ima_hooks func) in ima_must_appraise() argument 83 func, mask, IMA_APPRAISE | IMA_HASH, NULL, in ima_must_appraise() 283 int mask; in xattr_verify() local 325 mask = IMA_DIGSIG_REQUIRED | IMA_VERITY_REQUIRED; in xattr_verify() 326 if ((iint->flags & mask) == mask) { in xattr_verify()
|
D | ima_main.c | 203 u32 secid, char *buf, loff_t size, int mask, in process_measurement() argument 229 mask, func, &pcr, &template_desc, NULL, in process_measurement() 391 if ((mask & MAY_WRITE) && test_bit(IMA_DIGSIG, &iint->atomic_flags) && in process_measurement() 529 int ima_file_check(struct file *file, int mask) in ima_file_check() argument 535 mask & (MAY_READ | MAY_WRITE | MAY_EXEC | in ima_file_check()
|
D | ima_api.c | 190 const struct cred *cred, u32 secid, int mask, in ima_get_action() argument 199 return ima_match_policy(mnt_userns, inode, cred, secid, func, mask, in ima_get_action()
|
/security/selinux/ss/ |
D | avtab.c | 32 static inline int avtab_hash(const struct avtab_key *keyp, u32 mask) in avtab_hash() argument 65 return hash & mask; in avtab_hash() 116 hvalue = avtab_hash(key, h->mask); in avtab_insert() 161 hvalue = avtab_hash(key, h->mask); in avtab_insert_nonunique() 192 hvalue = avtab_hash(key, h->mask); in avtab_search() 228 hvalue = avtab_hash(key, h->mask); in avtab_search_node() 302 h->mask = 0; in avtab_destroy() 310 h->mask = 0; in avtab_init() 323 h->mask = nslot - 1; in avtab_alloc_common()
|
D | policydb.h | 184 u32 mask; member 188 u32 mask[4]; member
|
D | avtab.h | 87 u32 mask; /* mask to compute hash func */ member
|
/security/smack/ |
D | smackfs.c | 1155 struct in_addr mask; in smk_write_net4addr() local 1226 mask.s_addr = cpu_to_be32(temp_mask); in smk_write_net4addr() 1228 newname.sin_addr.s_addr &= mask.s_addr; in smk_write_net4addr() 1253 snp->smk_mask.s_addr = mask.s_addr; in smk_write_net4addr() 1420 unsigned int mask = 128; in smk_write_net6addr() local 1449 &mask, smack); in smk_write_net6addr() 1460 if (mask > 128) { in smk_write_net6addr() 1491 for (i = 0, m = mask; i < 8; i++) { in smk_write_net6addr() 1512 if (mask != snp->smk_masks) in smk_write_net6addr() 1531 snp->smk_masks = mask; in smk_write_net6addr()
|
/security/selinux/ |
D | hooks.c | 1926 static inline u32 file_mask_to_av(int mode, int mask) in file_mask_to_av() argument 1931 if (mask & MAY_EXEC) in file_mask_to_av() 1933 if (mask & MAY_READ) in file_mask_to_av() 1936 if (mask & MAY_APPEND) in file_mask_to_av() 1938 else if (mask & MAY_WRITE) in file_mask_to_av() 1942 if (mask & MAY_EXEC) in file_mask_to_av() 1944 if (mask & MAY_WRITE) in file_mask_to_av() 1946 if (mask & MAY_READ) in file_mask_to_av() 3020 static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mask) in selinux_inode_mkdir() argument 3084 static int selinux_inode_permission(struct inode *inode, int mask) in selinux_inode_permission() argument [all …]
|
/security/ |
D | security.c | 1032 int security_path_notify(const struct path *path, u64 mask, in security_path_notify() argument 1035 return call_int_hook(path_notify, 0, path, mask, obj_type); in security_path_notify() 1336 int security_inode_permission(struct inode *inode, int mask) in security_inode_permission() argument 1340 return call_int_hook(inode_permission, 0, inode, mask); in security_inode_permission() 1530 int security_file_permission(struct file *file, int mask) in security_file_permission() argument 1534 ret = call_int_hook(file_permission, 0, file, mask); in security_file_permission() 1538 return fsnotify_perm(file, mask); in security_file_permission()
|