Home
last modified time | relevance | path

Searched refs:perms (Results 1 – 25 of 42) sorted by relevance

12

/linux/security/apparmor/
H A Dpolicy_compat.c100 static void compute_fperms_allow(struct aa_perms *perms, struct aa_dfa *dfa, in compute_fperms_allow() argument
103 perms->allow |= AA_MAY_GETATTR; in compute_fperms_allow()
107 perms->allow |= AA_MAY_CHANGE_PROFILE; in compute_fperms_allow()
109 perms->allow |= AA_MAY_ONEXEC; in compute_fperms_allow()
115 struct aa_perms perms = { }; in compute_fperms_user() local
117 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in compute_fperms_user()
118 perms.audit = map_old_perms(dfa_user_audit(dfa, state)); in compute_fperms_user()
119 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state)); in compute_fperms_user()
120 perms.xindex = dfa_user_xindex(dfa, state); in compute_fperms_user()
122 compute_fperms_allow(&perms, dfa, state); in compute_fperms_user()
[all …]
H A Dfile.c95 struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() argument
114 u32 mask = perms->audit; in aa_audit_file()
127 ad.request = ad.request & ~perms->allow; in aa_audit_file()
130 if (ad.request & perms->kill) in aa_audit_file()
134 if ((ad.request & perms->quiet) && in aa_audit_file()
137 ad.request &= ~perms->quiet; in aa_audit_file()
143 ad.denied = ad.request & ~perms->allow; in aa_audit_file()
185 if (!(file_rules->perms)) in aa_lookup_fperms()
189 return &(file_rules->perms[index]); in aa_lookup_fperms()
191 return &(file_rules->perms[index + 1]); in aa_lookup_fperms()
[all …]
H A Dmount.c139 struct aa_perms *perms, const char *info, int error) in audit_mount() argument
145 u32 mask = perms->audit; in audit_mount()
158 request = request & ~perms->allow; in audit_mount()
160 if (request & perms->kill) in audit_mount()
164 if ((request & perms->quiet) && in audit_mount()
167 request &= ~perms->quiet; in audit_mount()
179 if (data && (perms->audit & AA_AUDIT_DATA)) in audit_mount()
229 void *data, bool binary, struct aa_perms *perms) in do_match_mnt() argument
235 AA_BUG(!policy->perms); in do_match_mnt()
236 AA_BUG(!perms); in do_match_mnt()
[all …]
H A Dnet.c115 struct aa_perms perms = { }; in aa_profile_af_perm() local
132 perms = *aa_lookup_perms(rules->policy, state); in aa_profile_af_perm()
133 aa_apply_modes_to_perms(profile, &perms); in aa_profile_af_perm()
135 return aa_check_perms(profile, &perms, request, ad, audit_net_cb); in aa_profile_af_perm()
225 struct aa_perms perms = { }; in aa_secmark_perm() local
242 perms.deny = ALL_PERMS_MASK; in aa_secmark_perm()
244 perms.allow = ALL_PERMS_MASK; in aa_secmark_perm()
247 perms.audit = ALL_PERMS_MASK; in aa_secmark_perm()
251 aa_apply_modes_to_perms(profile, &perms); in aa_secmark_perm()
253 return aa_check_perms(profile, &perms, request, ad, audit_net_cb); in aa_secmark_perm()
H A Dtask.c233 struct aa_perms perms = { }; in profile_ptrace_perm() local
238 &perms); in profile_ptrace_perm()
239 aa_apply_modes_to_perms(profile, &perms); in profile_ptrace_perm()
240 return aa_check_perms(profile, &perms, request, ad, audit_ptrace_cb); in profile_ptrace_perm()
320 struct aa_perms perms = { }; in aa_profile_ns_perm() local
336 perms = *aa_lookup_perms(rules->policy, state); in aa_profile_ns_perm()
337 aa_apply_modes_to_perms(profile, &perms); in aa_profile_ns_perm()
338 error = aa_check_perms(profile, &perms, request, ad, in aa_profile_ns_perm()
H A Dipc.c85 struct aa_perms perms; in profile_signal_perm() local
98 aa_label_match(profile, rules, peer, state, false, request, &perms); in profile_signal_perm()
99 aa_apply_modes_to_perms(profile, &perms); in profile_signal_perm()
100 return aa_check_perms(profile, &perms, request, ad, audit_signal_cb); in profile_signal_perm()
/linux/security/apparmor/include/
H A Dfile.h75 struct aa_profile *profile, struct aa_perms *perms,
84 struct aa_perms *perms);
110 u32 perms = 0; in aa_map_file_to_perms() local
113 perms |= MAY_WRITE; in aa_map_file_to_perms()
115 perms |= MAY_READ; in aa_map_file_to_perms()
117 if ((flags & O_APPEND) && (perms & MAY_WRITE)) in aa_map_file_to_perms()
118 perms = (perms & ~MAY_WRITE) | MAY_APPEND; in aa_map_file_to_perms()
121 perms |= MAY_WRITE; in aa_map_file_to_perms()
123 perms |= AA_MAY_CREATE; in aa_map_file_to_perms()
125 return perms; in aa_map_file_to_perms()
/linux/include/linux/
H A Dkernel.h394 #define VERIFY_OCTAL_PERMISSIONS(perms) \ argument
395 (BUILD_BUG_ON_ZERO((perms) < 0) + \
396 BUILD_BUG_ON_ZERO((perms) > 0777) + \
398 BUILD_BUG_ON_ZERO((((perms) >> 6) & 4) < (((perms) >> 3) & 4)) + \
399 BUILD_BUG_ON_ZERO((((perms) >> 3) & 4) < ((perms) & 4)) + \
401 BUILD_BUG_ON_ZERO((((perms) >> 6) & 2) < (((perms) >> 3) & 2)) + \
403 BUILD_BUG_ON_ZERO((perms) & 2) + \
404 (perms))
/linux/arch/arm/mm/
H A Dinit.c395 static void set_section_perms(struct section_perm *perms, int n, bool set, in set_section_perms() argument
405 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) || in set_section_perms()
406 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) { in set_section_perms()
408 perms[i].name, perms[i].start, perms[i].end, in set_section_perms()
413 for (addr = perms[i].start; in set_section_perms()
414 addr < perms[i].end; in set_section_perms()
416 section_update(addr, perms[i].mask, in set_section_perms()
417 set ? perms[i].prot : perms[i].clear, mm); in set_section_perms()
427 static void update_sections_early(struct section_perm perms[], int n) in update_sections_early() argument
436 set_section_perms(perms, n, true, s->mm); in update_sections_early()
[all …]
/linux/drivers/s390/crypto/
H A Dzcrypt_api.c120 struct ap_perms perms; member
165 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++) in ioctlmask_show()
166 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.ioctlm[i]); in ioctlmask_show()
181 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm, in ioctlmask_store()
202 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++) in apmask_show()
203 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.apm[i]); in apmask_show()
218 rc = ap_parse_mask_str(buf, zcdndev->perms.apm, in apmask_store()
239 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++) in aqmask_show()
240 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.aqm[i]); in aqmask_show()
255 rc = ap_parse_mask_str(buf, zcdndev->perms.aqm, in aqmask_store()
[all …]
/linux/drivers/infiniband/sw/siw/
H A Dsiw_mem.c98 mem->perms = rights & IWARP_ACCESS_MASK; in siw_mr_add_mem()
161 enum ib_access_flags perms, int len) in siw_check_mem() argument
174 if ((mem->perms & perms) < perms) { in siw_check_mem()
176 mem->perms, perms); in siw_check_mem()
215 enum ib_access_flags perms, u32 off, int len) in siw_check_sge() argument
240 rv = siw_check_mem(pd, *mem, sge->laddr + off, perms, len); in siw_check_sge()
H A Dsiw_mem.h18 enum ib_access_flags perms, int len);
20 struct siw_mem *mem[], enum ib_access_flags perms,
/linux/fs/orangefs/
H A Dorangefs-utils.c106 if (attrs->perms & ORANGEFS_O_EXECUTE) in orangefs_inode_perms()
108 if (attrs->perms & ORANGEFS_O_WRITE) in orangefs_inode_perms()
110 if (attrs->perms & ORANGEFS_O_READ) in orangefs_inode_perms()
113 if (attrs->perms & ORANGEFS_G_EXECUTE) in orangefs_inode_perms()
115 if (attrs->perms & ORANGEFS_G_WRITE) in orangefs_inode_perms()
117 if (attrs->perms & ORANGEFS_G_READ) in orangefs_inode_perms()
120 if (attrs->perms & ORANGEFS_U_EXECUTE) in orangefs_inode_perms()
122 if (attrs->perms & ORANGEFS_U_WRITE) in orangefs_inode_perms()
124 if (attrs->perms & ORANGEFS_U_READ) in orangefs_inode_perms()
127 if (attrs->perms & ORANGEFS_G_SGID) in orangefs_inode_perms()
[all …]
/linux/fs/hfsplus/
H A Dcatalog.c81 void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms) in hfsplus_cat_set_perms() argument
84 perms->rootflags |= HFSPLUS_FLG_IMMUTABLE; in hfsplus_cat_set_perms()
86 perms->rootflags &= ~HFSPLUS_FLG_IMMUTABLE; in hfsplus_cat_set_perms()
88 perms->rootflags |= HFSPLUS_FLG_APPEND; in hfsplus_cat_set_perms()
90 perms->rootflags &= ~HFSPLUS_FLG_APPEND; in hfsplus_cat_set_perms()
92 perms->userflags = HFSPLUS_I(inode)->userflags; in hfsplus_cat_set_perms()
93 perms->mode = cpu_to_be16(inode->i_mode); in hfsplus_cat_set_perms()
94 perms->owner = cpu_to_be32(i_uid_read(inode)); in hfsplus_cat_set_perms()
95 perms->group = cpu_to_be32(i_gid_read(inode)); in hfsplus_cat_set_perms()
98 perms->dev = cpu_to_be32(inode->i_nlink); in hfsplus_cat_set_perms()
[all …]
H A Dinode.c182 struct hfsplus_perm *perms, int dir) in hfsplus_get_perms() argument
187 mode = be16_to_cpu(perms->mode); in hfsplus_get_perms()
189 i_uid_write(inode, be32_to_cpu(perms->owner)); in hfsplus_get_perms()
193 i_gid_write(inode, be32_to_cpu(perms->group)); in hfsplus_get_perms()
204 HFSPLUS_I(inode)->userflags = perms->userflags; in hfsplus_get_perms()
205 if (perms->rootflags & HFSPLUS_FLG_IMMUTABLE) in hfsplus_get_perms()
209 if (perms->rootflags & HFSPLUS_FLG_APPEND) in hfsplus_get_perms()
/linux/security/selinux/include/
H A Dsecurity.h234 #define security_xperm_set(perms, x) ((perms)[(x) >> 5] |= 1 << ((x)&0x1f)) argument
235 #define security_xperm_test(perms, x) (1 & ((perms)[(x) >> 5] >> ((x)&0x1f))) argument
324 char ***perms, u32 *nperms);
H A Davc_ss.h18 const char *perms[sizeof(u32) * 8 + 1]; member
/linux/tools/testing/selftests/mm/
H A Dmlock2.h18 char perms[5]; in seek_to_smaps_entry() local
30 &start, &end, perms, &offset, dev, &inode, path) < 6) in seek_to_smaps_entry()
/linux/security/selinux/
H A Davc.c656 const char *const *perms; in avc_audit_pre_callback() local
666 perms = secclass_map[sad->tclass-1].perms; in avc_audit_pre_callback()
672 if ((perm & av) && perms[i]) { in avc_audit_pre_callback()
673 audit_log_format(ab, " %s", perms[i]); in avc_audit_pre_callback()
830 static int avc_update_node(u32 event, u32 perms, u8 driver, u8 base_perm, in avc_update_node() argument
887 node->ae.avd.allowed |= perms; in avc_update_node()
893 node->ae.avd.allowed &= ~perms; in avc_update_node()
896 node->ae.avd.auditallow |= perms; in avc_update_node()
899 node->ae.avd.auditallow &= ~perms; in avc_update_node()
902 node->ae.avd.auditdeny |= perms; in avc_update_node()
[all …]
H A Dhooks.c1664 u32 perms, in inode_has_perm() argument
1676 return avc_has_perm(sid, isec->sid, isec->sclass, perms, adp); in inode_has_perm()
1946 u32 perms, in superblock_has_perm() argument
1953 return avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM, perms, ad); in superblock_has_perm()
3078 u32 perms, u32 audited, u32 denied, in audit_inode_permission() argument
3087 return slow_avc_audit(current_sid(), isec->sid, isec->sclass, perms, in audit_inode_permission()
3093 u32 perms; in selinux_inode_permission() local
3112 perms = file_mask_to_av(inode->i_mode, mask); in selinux_inode_permission()
3118 rc = avc_has_perm_noaudit(sid, isec->sid, isec->sclass, perms, 0, in selinux_inode_permission()
3120 audited = avc_audit_required(perms, &avd, rc, in selinux_inode_permission()
[all …]
/linux/tools/testing/selftests/mqueue/
H A Dmq_open_tests.c203 int perms = DEFFILEMODE; in test_queue() local
205 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue()
225 int perms = DEFFILEMODE; in test_queue_fail() local
227 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue_fail()
/linux/security/selinux/ss/
H A Dservices.c139 while (p_in->perms[k]) { in selinux_set_mapping()
141 if (!*p_in->perms[k]) { in selinux_set_mapping()
145 p_out->perms[k] = string_to_av_perm(pol, p_out->value, in selinux_set_mapping()
146 p_in->perms[k]); in selinux_set_mapping()
147 if (!p_out->perms[k]) { in selinux_set_mapping()
149 p_in->perms[k], p_in->name); in selinux_set_mapping()
209 if (avd->allowed & mapping->perms[i]) in map_decision()
211 if (allow_unknown && !mapping->perms[i]) in map_decision()
217 if (avd->auditallow & mapping->perms[i]) in map_decision()
222 if (avd->auditdeny & mapping->perms[i]) in map_decision()
[all …]
H A Dservices.h17 u32 perms[sizeof(u32) * 8]; /* policy values for permissions */ member
/linux/drivers/net/wireless/rsi/
H A Drsi_debugfs.h36 umode_t perms; member
/linux/arch/x86/platform/uv/
H A Dbios_uv.c136 uv_bios_change_memprotect(u64 paddr, u64 len, enum uv_memprotect perms) in uv_bios_change_memprotect() argument
139 perms, 0, 0); in uv_bios_change_memprotect()

12