Lines Matching refs:profile
111 struct aa_profile *profile; in apparmor_capget() local
116 profile = aa_cred_profile(cred); in apparmor_capget()
122 if (!unconfined(profile) && !COMPLAIN_MODE(profile)) { in apparmor_capget()
123 *effective = cap_intersect(*effective, profile->caps.allow); in apparmor_capget()
124 *permitted = cap_intersect(*permitted, profile->caps.allow); in apparmor_capget()
134 struct aa_profile *profile; in apparmor_capable() local
137 profile = aa_cred_profile(cred); in apparmor_capable()
138 if (!unconfined(profile)) in apparmor_capable()
139 error = aa_capable(profile, cap, audit); in apparmor_capable()
155 struct aa_profile *profile; in common_perm() local
158 profile = __aa_current_profile(); in common_perm()
159 if (!unconfined(profile)) in common_perm()
160 error = aa_path_perm(op, profile, path, 0, mask, cond); in common_perm()
295 struct aa_profile *profile; in apparmor_path_link() local
301 profile = aa_current_profile(); in apparmor_path_link()
302 if (!unconfined(profile)) in apparmor_path_link()
303 error = aa_path_link(profile, old_dentry, new_dir, new_dentry); in apparmor_path_link()
310 struct aa_profile *profile; in apparmor_path_rename() local
316 profile = aa_current_profile(); in apparmor_path_rename()
317 if (!unconfined(profile)) { in apparmor_path_rename()
324 error = aa_path_perm(OP_RENAME_SRC, profile, &old_path, 0, in apparmor_path_rename()
329 error = aa_path_perm(OP_RENAME_DEST, profile, &new_path, in apparmor_path_rename()
369 struct aa_profile *profile; in apparmor_file_open() local
385 profile = aa_cred_profile(cred); in apparmor_file_open()
386 if (!unconfined(profile)) { in apparmor_file_open()
390 error = aa_path_perm(OP_OPEN, profile, &file->f_path, 0, in apparmor_file_open()
419 struct aa_profile *profile, *fprofile = aa_cred_profile(file->f_cred); in common_file_perm() local
428 profile = __aa_current_profile(); in common_file_perm()
437 if (!unconfined(profile) && !unconfined(fprofile) && in common_file_perm()
438 ((fprofile != profile) || (mask & ~fcxt->allow))) in common_file_perm()
439 error = aa_file_perm(op, profile, file, mask); in common_file_perm()
501 struct aa_profile *profile = NULL; in apparmor_getprocattr() local
504 profile = aa_get_newest_profile(cxt->profile); in apparmor_getprocattr()
506 profile = aa_get_newest_profile(cxt->previous); in apparmor_getprocattr()
508 profile = aa_get_newest_profile(cxt->onexec); in apparmor_getprocattr()
512 if (profile) in apparmor_getprocattr()
513 error = aa_getprocattr(profile, value); in apparmor_getprocattr()
515 aa_put_profile(profile); in apparmor_getprocattr()
588 aad.profile = aa_current_profile(); in apparmor_setprocattr()
599 struct aa_profile *profile = __aa_current_profile(); in apparmor_task_setrlimit() local
602 if (!unconfined(profile)) in apparmor_task_setrlimit()
603 error = aa_task_setrlimit(profile, task, resource, new_rlim); in apparmor_task_setrlimit()
878 cxt->profile = aa_get_profile(root_ns->unconfined); in set_init_cxt()