Home
last modified time | relevance | path

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

/linux-4.1.27/security/apparmor/
Dfile.c106 int aa_audit_file(struct aa_profile *profile, struct file_perms *perms, in aa_audit_file() argument
124 u32 mask = perms->audit; in aa_audit_file()
137 sa.aad->fs.request = sa.aad->fs.request & ~perms->allow; in aa_audit_file()
139 if (sa.aad->fs.request & perms->kill) in aa_audit_file()
143 if ((sa.aad->fs.request & perms->quiet) && in aa_audit_file()
146 sa.aad->fs.request &= ~perms->quiet; in aa_audit_file()
152 sa.aad->fs.denied = sa.aad->fs.request & ~perms->allow; in aa_audit_file()
197 struct file_perms perms; in compute_perms() local
204 perms.kill = 0; in compute_perms()
207 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in compute_perms()
[all …]
Ddomain.c100 struct file_perms perms; in change_profile_perms() local
105 perms.allow = AA_MAY_CHANGE_PROFILE | AA_MAY_ONEXEC; in change_profile_perms()
106 perms.audit = perms.quiet = perms.kill = 0; in change_profile_perms()
107 return perms; in change_profile_perms()
112 aa_str_perms(profile->file.dfa, start, name, &cond, &perms); in change_profile_perms()
113 if (COMBINED_PERM_MASK(perms) & request) in change_profile_perms()
114 return perms; in change_profile_perms()
120 aa_str_perms(profile->file.dfa, state, name, &cond, &perms); in change_profile_perms()
122 return perms; in change_profile_perms()
344 struct file_perms perms = {}; in apparmor_bprm_set_creds() local
[all …]
/linux-4.1.27/security/apparmor/include/
Dfile.h147 int aa_audit_file(struct aa_profile *profile, struct file_perms *perms,
172 struct file_perms *perms);
198 u32 perms = 0; in aa_map_file_to_perms() local
201 perms |= MAY_WRITE; in aa_map_file_to_perms()
203 perms |= MAY_READ; in aa_map_file_to_perms()
205 if ((flags & O_APPEND) && (perms & MAY_WRITE)) in aa_map_file_to_perms()
206 perms = (perms & ~MAY_WRITE) | MAY_APPEND; in aa_map_file_to_perms()
209 perms |= MAY_WRITE; in aa_map_file_to_perms()
211 perms |= AA_MAY_CREATE; in aa_map_file_to_perms()
213 return perms; in aa_map_file_to_perms()
/linux-4.1.27/scripts/selinux/genheaders/
Dgenheaders.c10 const char *perms[sizeof(unsigned) * 8 + 1]; member
64 for (j = 0; map->perms[j]; j++) in main()
65 map->perms[j] = stoupperx(map->perms[j]); in main()
126 for (j = 0; map->perms[j]; j++) { in main()
128 map->perms[j]); in main()
129 for (k = 0; k < max(1, 40 - strlen(map->name) - strlen(map->perms[j])); k++) in main()
/linux-4.1.27/fs/nfsd/
Dnfs4acl.c443 struct posix_ace_state perms; member
538 low_mode_from_nfs4(state->users->aces[i].perms.allow, in posix_state_to_acl()
541 add_to_mask(state, &state->users->aces[i].perms); in posix_state_to_acl()
552 low_mode_from_nfs4(state->groups->aces[i].perms.allow, in posix_state_to_acl()
555 add_to_mask(state, &state->groups->aces[i].perms); in posix_state_to_acl()
594 a->aces[i].perms.allow = state->everyone.allow; in find_uid()
595 a->aces[i].perms.deny = state->everyone.deny; in find_uid()
611 a->aces[i].perms.allow = state->everyone.allow; in find_gid()
612 a->aces[i].perms.deny = state->everyone.deny; in find_gid()
622 deny_bits(&a->aces[i].perms, mask); in deny_bits_array()
[all …]
/linux-4.1.27/arch/arm/mm/
Dinit.c658 #define set_section_perms(perms, field) { \ argument
665 for (i = 0; i < ARRAY_SIZE(perms); i++) { \
666 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) || \
667 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) { \
669 perms[i].start, perms[i].end, \
674 for (addr = perms[i].start; \
675 addr < perms[i].end; \
677 section_update(addr, perms[i].mask, \
678 perms[i].field); \
/linux-4.1.27/fs/hfsplus/
Dcatalog.c80 void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms) in hfsplus_cat_set_perms() argument
83 perms->rootflags |= HFSPLUS_FLG_IMMUTABLE; in hfsplus_cat_set_perms()
85 perms->rootflags &= ~HFSPLUS_FLG_IMMUTABLE; in hfsplus_cat_set_perms()
87 perms->rootflags |= HFSPLUS_FLG_APPEND; in hfsplus_cat_set_perms()
89 perms->rootflags &= ~HFSPLUS_FLG_APPEND; in hfsplus_cat_set_perms()
91 perms->userflags = HFSPLUS_I(inode)->userflags; in hfsplus_cat_set_perms()
92 perms->mode = cpu_to_be16(inode->i_mode); in hfsplus_cat_set_perms()
93 perms->owner = cpu_to_be32(i_uid_read(inode)); in hfsplus_cat_set_perms()
94 perms->group = cpu_to_be32(i_gid_read(inode)); in hfsplus_cat_set_perms()
97 perms->dev = cpu_to_be32(inode->i_nlink); in hfsplus_cat_set_perms()
[all …]
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()
Dhfsplus_fs.h450 void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms);
/linux-4.1.27/security/selinux/
Davc.c96 const char **perms; in avc_dump_av() local
104 perms = secclass_map[tclass-1].perms; in avc_dump_av()
110 if ((perm & av) && perms[i]) { in avc_dump_av()
111 audit_log_format(ab, " %s", perms[i]); in avc_dump_av()
532 static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass, in avc_update_node() argument
579 node->ae.avd.allowed |= perms; in avc_update_node()
583 node->ae.avd.allowed &= ~perms; in avc_update_node()
586 node->ae.avd.auditallow |= perms; in avc_update_node()
589 node->ae.avd.auditallow &= ~perms; in avc_update_node()
592 node->ae.avd.auditdeny |= perms; in avc_update_node()
[all …]
Dhooks.c1491 u32 perms) in cred_has_perm() argument
1495 return avc_has_perm(asid, tsid, SECCLASS_PROCESS, perms, NULL); in cred_has_perm()
1506 u32 perms) in task_has_perm() argument
1515 return avc_has_perm(sid1, sid2, SECCLASS_PROCESS, perms, NULL); in task_has_perm()
1525 u32 perms) in current_has_perm() argument
1531 return avc_has_perm(sid, tsid, SECCLASS_PROCESS, perms, NULL); in current_has_perm()
1577 u32 perms) in task_has_system() argument
1582 SECCLASS_SYSTEM, perms, NULL); in task_has_system()
1590 u32 perms, in inode_has_perm() argument
1604 return avc_has_perm(sid, isec->sid, isec->sclass, perms, adp); in inode_has_perm()
[all …]
Dselinuxfs.c82 u32 perms) in task_has_security() argument
96 SECCLASS_SECURITY, perms, NULL); in task_has_security()
1588 char **perms; in sel_make_perm_files() local
1590 rc = security_get_permissions(objclass, &perms, &nperms); in sel_make_perm_files()
1599 dentry = d_alloc_name(dir, perms[i]); in sel_make_perm_files()
1616 kfree(perms[i]); in sel_make_perm_files()
1617 kfree(perms); in sel_make_perm_files()
/linux-4.1.27/scripts/selinux/mdp/
Dmdp.c41 const char *perms[sizeof(unsigned) * 8 + 1]; member
87 for (j = 0; map->perms[j]; j++) in main()
88 fprintf(fout, "\t%s\n", map->perms[j]); in main()
/linux-4.1.27/include/linux/
Dkernel.h821 #define VERIFY_OCTAL_PERMISSIONS(perms) \ argument
822 (BUILD_BUG_ON_ZERO((perms) < 0) + \
823 BUILD_BUG_ON_ZERO((perms) > 0777) + \
825 BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \
826 BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \
828 BUILD_BUG_ON_ZERO((perms) & 2) + \
829 (perms))
/linux-4.1.27/security/selinux/ss/
Dservices.c103 u32 perms[sizeof(u32) * 8]; member
157 while (p_in->perms && p_in->perms[k]) { in selinux_set_mapping()
159 if (!*p_in->perms[k]) { in selinux_set_mapping()
163 p_out->perms[k] = string_to_av_perm(pol, p_out->value, in selinux_set_mapping()
164 p_in->perms[k]); in selinux_set_mapping()
165 if (!p_out->perms[k]) { in selinux_set_mapping()
168 p_in->perms[k], p_in->name); in selinux_set_mapping()
226 if (avd->allowed & current_mapping[tclass].perms[i]) in map_decision()
228 if (allow_unknown && !current_mapping[tclass].perms[i]) in map_decision()
234 if (avd->auditallow & current_mapping[tclass].perms[i]) in map_decision()
[all …]
/linux-4.1.27/tools/testing/selftests/mqueue/
Dmq_open_tests.c199 int perms = DEFFILEMODE; in test_queue() local
201 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue()
221 int perms = DEFFILEMODE; in test_queue_fail() local
223 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue_fail()
Dmq_perf_tests.c289 int perms = DEFFILEMODE; in open_queue() local
291 queue = mq_open(queue_path, flags, perms, attr); in open_queue()
/linux-4.1.27/security/selinux/include/
Davc_ss.h16 const char *perms[sizeof(u32) * 8 + 1]; member
Dsecurity.h168 int security_get_permissions(char *class, char ***perms, int *nperms);
/linux-4.1.27/drivers/net/wireless/rsi/
Drsi_debugfs.h36 umode_t perms; member
Drsi_91x_debugfs.c311 files->perms, in rsi_init_dbgfs()
/linux-4.1.27/arch/x86/platform/uv/
Dbios_uv.c142 uv_bios_change_memprotect(u64 paddr, u64 len, enum uv_memprotect perms) in uv_bios_change_memprotect() argument
145 perms, 0, 0); in uv_bios_change_memprotect()
/linux-4.1.27/drivers/infiniband/hw/cxgb3/
Diwch_mem.c63 mhp->attr.perms, in iwch_register_mem()
93 mhp->attr.perms, in iwch_reregister_mem()
Diwch_provider.h60 enum tpt_mem_perm perms; member
Diwch_provider.c528 mhp->attr.perms = iwch_ib_to_tpt_access(acc); in iwch_register_phys_mem()
585 mh.attr.perms = iwch_ib_to_tpt_access(acc); in iwch_reregister_phys_mem()
603 mhp->attr.perms = iwch_ib_to_tpt_access(acc); in iwch_reregister_phys_mem()
686 mhp->attr.perms = iwch_ib_to_tpt_access(acc); in iwch_reg_user_mr()
Dcxio_wr.h259 u8 perms; member
Diwch_qp.c577 wqe->bind.perms = iwch_ib_to_tpt_bind_access( in iwch_bind_mw()
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
Dmem.c380 mhp->attr.perms : 0, in register_mem()
406 FW_RI_STAG_NSMR, mhp->attr.perms, in reregister_mem()
535 mh.attr.perms = c4iw_ib_to_tpt_access(acc); in c4iw_reregister_phys_mem()
560 mhp->attr.perms = c4iw_ib_to_tpt_access(acc); in c4iw_reregister_phys_mem()
634 mhp->attr.perms = c4iw_ib_to_tpt_access(acc); in c4iw_register_phys_mem()
674 mhp->attr.perms = c4iw_ib_to_tpt_access(acc); in c4iw_get_dma_mr()
683 FW_RI_STAG_NSMR, mhp->attr.perms, in c4iw_get_dma_mr()
782 mhp->attr.perms = c4iw_ib_to_tpt_access(acc); in c4iw_reg_user_mr()
Diw_cxgb4.h370 enum fw_ri_mem_perms perms; member
/linux-4.1.27/drivers/usb/gadget/function/
Df_fs.c1082 struct ffs_file_perms *perms) in ffs_sb_make_inode() argument
1094 inode->i_mode = perms->mode; in ffs_sb_make_inode()
1095 inode->i_uid = perms->uid; in ffs_sb_make_inode()
1096 inode->i_gid = perms->gid; in ffs_sb_make_inode()
1142 struct ffs_file_perms perms; member
1167 data->perms.mode = data->root_mode; in ffs_sb_fill()
1171 &data->perms); in ffs_sb_fill()
1226 data->perms.mode = (value & 0666) | S_IFREG; in ffs_fs_parse_opts()
1234 data->perms.mode = (value & 0666) | S_IFREG; in ffs_fs_parse_opts()
1242 data->perms.uid = make_kuid(current_user_ns(), value); in ffs_fs_parse_opts()
[all …]
/linux-4.1.27/arch/ia64/include/asm/sn/
Dsn_sal.h732 sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) in sn_change_memprotect() argument
737 (u64)nasid_array, perms, 0, 0, 0); in sn_change_memprotect()
/linux-4.1.27/arch/blackfin/kernel/
Ddebug-mmrs.c31 #define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)(addr)) argument
469 #define _D_SPORT(name, perms, fops) \ argument
472 debugfs_create_file(buf, perms, parent, (void *)(base + SPORT_OFF(name)), fops); \
/linux-4.1.27/Documentation/filesystems/cifs/
DCHANGES1042 3) default file perms are now 2767 (indicating support for mandatory locks) instead of 777 for dire…
1043 in most cases. Eventually will offer optional ability to query server for the correct perms.
/linux-4.1.27/Documentation/filesystems/
Dproc.txt338 address perms offset dev inode pathname
361 where "address" is the address space in the process that it occupies, "perms"