Lines Matching refs:perms
100 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
400 state = aa_str_perms(profile->file.dfa, state, name, &cond, &perms); in apparmor_bprm_set_creds()
404 if (!(perms.allow & AA_MAY_ONEXEC)) in apparmor_bprm_set_creds()
422 if (perms.allow & MAY_EXEC) { in apparmor_bprm_set_creds()
424 new_profile = x_to_profile(profile, name, perms.xindex); in apparmor_bprm_set_creds()
426 if (perms.xindex & AA_X_INHERIT) { in apparmor_bprm_set_creds()
434 } else if (perms.xindex & AA_X_UNCONFINED) { in apparmor_bprm_set_creds()
441 perms.allow &= ~MAY_EXEC; in apparmor_bprm_set_creds()
454 perms.xindex |= AA_X_UNSAFE; in apparmor_bprm_set_creds()
497 if (!(perms.xindex & AA_X_UNSAFE)) { in apparmor_bprm_set_creds()
516 error = aa_audit_file(profile, &perms, GFP_KERNEL, OP_EXEC, MAY_EXEC, in apparmor_bprm_set_creds()
615 struct file_perms perms = {}; in aa_change_hat() local
702 perms.kill = AA_MAY_CHANGEHAT; in aa_change_hat()
713 perms.kill = AA_MAY_CHANGEHAT; in aa_change_hat()
720 error = aa_audit_file(profile, &perms, GFP_KERNEL, in aa_change_hat()
753 struct file_perms perms = {}; in aa_change_profile() local
806 perms = change_profile_perms(profile, ns, hname, request, in aa_change_profile()
808 if (!(perms.allow & request)) { in aa_change_profile()
846 error = aa_audit_file(profile, &perms, GFP_KERNEL, op, request, in aa_change_profile()