Lines Matching refs:cred
49 static void apparmor_cred_free(struct cred *cred) in apparmor_cred_free() argument
51 aa_free_task_context(cred_cxt(cred)); in apparmor_cred_free()
52 cred_cxt(cred) = NULL; in apparmor_cred_free()
58 static int apparmor_cred_alloc_blank(struct cred *cred, gfp_t gfp) in apparmor_cred_alloc_blank() argument
65 cred_cxt(cred) = cxt; in apparmor_cred_alloc_blank()
72 static int apparmor_cred_prepare(struct cred *new, const struct cred *old, in apparmor_cred_prepare()
88 static void apparmor_cred_transfer(struct cred *new, const struct cred *old) in apparmor_cred_transfer()
120 const struct cred *cred; in apparmor_capget() local
123 cred = __task_cred(target); in apparmor_capget()
124 profile = aa_cred_profile(cred); in apparmor_capget()
126 *effective = cred->cap_effective; in apparmor_capget()
127 *inheritable = cred->cap_inheritable; in apparmor_capget()
128 *permitted = cred->cap_permitted; in apparmor_capget()
139 static int apparmor_capable(const struct cred *cred, struct user_namespace *ns, in apparmor_capable() argument
144 int error = cap_capable(cred, ns, cap, audit); in apparmor_capable()
146 profile = aa_cred_profile(cred); in apparmor_capable()
376 static int apparmor_file_open(struct file *file, const struct cred *cred) in apparmor_file_open() argument
395 profile = aa_cred_profile(cred); in apparmor_file_open()
509 const struct cred *cred = get_task_cred(task); in apparmor_getprocattr() local
510 struct aa_task_cxt *cxt = cred_cxt(cred); in apparmor_getprocattr()
526 put_cred(cred); in apparmor_getprocattr()
884 struct cred *cred = (struct cred *)current->real_cred; in set_init_cxt() local
892 cred_cxt(cred) = cxt; in set_init_cxt()
921 struct cred *cred = (struct cred *)current->real_cred; in apparmor_init() local
922 aa_free_task_context(cred_cxt(cred)); in apparmor_init()
923 cred_cxt(cred) = NULL; in apparmor_init()