Lines Matching refs:profile

119 	struct aa_profile *profile;  in apparmor_capget()  local
124 profile = aa_cred_profile(cred); in apparmor_capget()
130 if (!unconfined(profile) && !COMPLAIN_MODE(profile)) { in apparmor_capget()
131 *effective = cap_intersect(*effective, profile->caps.allow); in apparmor_capget()
132 *permitted = cap_intersect(*permitted, profile->caps.allow); in apparmor_capget()
142 struct aa_profile *profile; in apparmor_capable() local
146 profile = aa_cred_profile(cred); in apparmor_capable()
147 if (!unconfined(profile)) in apparmor_capable()
148 error = aa_capable(profile, cap, audit); in apparmor_capable()
165 struct aa_profile *profile; in common_perm() local
168 profile = __aa_current_profile(); in common_perm()
169 if (!unconfined(profile)) in common_perm()
170 error = aa_path_perm(op, profile, path, 0, mask, cond); in common_perm()
305 struct aa_profile *profile; in apparmor_path_link() local
311 profile = aa_current_profile(); in apparmor_path_link()
312 if (!unconfined(profile)) in apparmor_path_link()
313 error = aa_path_link(profile, old_dentry, new_dir, new_dentry); in apparmor_path_link()
320 struct aa_profile *profile; in apparmor_path_rename() local
326 profile = aa_current_profile(); in apparmor_path_rename()
327 if (!unconfined(profile)) { in apparmor_path_rename()
334 error = aa_path_perm(OP_RENAME_SRC, profile, &old_path, 0, in apparmor_path_rename()
339 error = aa_path_perm(OP_RENAME_DEST, profile, &new_path, in apparmor_path_rename()
379 struct aa_profile *profile; in apparmor_file_open() local
395 profile = aa_cred_profile(cred); in apparmor_file_open()
396 if (!unconfined(profile)) { in apparmor_file_open()
400 error = aa_path_perm(OP_OPEN, profile, &file->f_path, 0, in apparmor_file_open()
429 struct aa_profile *profile, *fprofile = aa_cred_profile(file->f_cred); in common_file_perm() local
438 profile = __aa_current_profile(); in common_file_perm()
447 if (!unconfined(profile) && !unconfined(fprofile) && in common_file_perm()
448 ((fprofile != profile) || (mask & ~fcxt->allow))) in common_file_perm()
449 error = aa_file_perm(op, profile, file, mask); in common_file_perm()
511 struct aa_profile *profile = NULL; in apparmor_getprocattr() local
514 profile = aa_get_newest_profile(cxt->profile); in apparmor_getprocattr()
516 profile = aa_get_newest_profile(cxt->previous); in apparmor_getprocattr()
518 profile = aa_get_newest_profile(cxt->onexec); in apparmor_getprocattr()
522 if (profile) in apparmor_getprocattr()
523 error = aa_getprocattr(profile, value); in apparmor_getprocattr()
525 aa_put_profile(profile); in apparmor_getprocattr()
598 aad.profile = aa_current_profile(); in apparmor_setprocattr()
609 struct aa_profile *profile = __aa_current_profile(); in apparmor_task_setrlimit() local
612 if (!unconfined(profile)) in apparmor_task_setrlimit()
613 error = aa_task_setrlimit(profile, task, resource, new_rlim); in apparmor_task_setrlimit()
891 cxt->profile = aa_get_profile(root_ns->unconfined); in set_init_cxt()