Lines Matching defs:cred

314 static void __init lsm_early_cred(struct cred *cred);
338 init_debug("cred blob size = %d\n", blob_sizes.lbs_cred);
357 lsm_early_cred((struct cred *) current->cred);
521 * lsm_cred_alloc - allocate a composite cred blob
522 * @cred: the cred that needs a blob
525 * Allocate the cred blob for all the modules
529 static int lsm_cred_alloc(struct cred *cred, gfp_t gfp)
532 cred->security = NULL;
536 cred->security = kzalloc(blob_sizes.lbs_cred, gfp);
537 if (cred->security == NULL)
543 * lsm_early_cred - during initialization allocate a composite cred blob
544 * @cred: the cred that needs a blob
546 * Allocate the cred blob for all the modules
548 static void __init lsm_early_cred(struct cred *cred)
550 int rc = lsm_cred_alloc(cred, GFP_KERNEL);
553 panic("%s: Early cred alloc failed.\n", __func__);
728 int security_binder_set_context_mgr(const struct cred *mgr)
733 int security_binder_transaction(const struct cred *from,
734 const struct cred *to)
739 int security_binder_transfer_binder(const struct cred *from,
740 const struct cred *to)
745 int security_binder_transfer_file(const struct cred *from,
746 const struct cred *to, struct file *file)
770 int security_capset(struct cred *new, const struct cred *old,
779 int security_capable(const struct cred *cred,
784 return call_int_hook(capable, 0, cred, ns, cap, opts);
1035 const struct cred *old, struct cred *new)
1426 int security_inode_copy_up(struct dentry *src, struct cred **new)
1637 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp)
1639 int rc = lsm_cred_alloc(cred, gfp);
1644 rc = call_int_hook(cred_alloc_blank, 0, cred, gfp);
1646 security_cred_free(cred);
1650 void security_cred_free(struct cred *cred)
1656 if (unlikely(cred->security == NULL))
1659 call_void_hook(cred_free, cred);
1661 kfree(cred->security);
1662 cred->security = NULL;
1665 int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp)
1678 void security_transfer_creds(struct cred *new, const struct cred *old)
1683 void security_cred_getsecid(const struct cred *c, u32 *secid)
1690 int security_kernel_act_as(struct cred *new, u32 secid)
1695 int security_kernel_create_files_as(struct cred *new, struct inode *inode)
1759 int security_task_fix_setuid(struct cred *new, const struct cred *old,
1765 int security_task_fix_setgid(struct cred *new, const struct cred *old,
1808 int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
1811 return call_int_hook(task_prlimit, 0, cred, tcred, flags);
1836 int sig, const struct cred *cred)
1838 return call_int_hook(task_kill, 0, p, info, sig, cred);
2118 int security_post_notification(const struct cred *w_cred,
2119 const struct cred *cred,
2122 return call_int_hook(post_notification, 0, w_cred, cred, n);
2498 int security_key_alloc(struct key *key, const struct cred *cred,
2501 return call_int_hook(key_alloc, 0, key, cred, flags);
2509 int security_key_permission(key_ref_t key_ref, const struct cred *cred,
2512 return call_int_hook(key_permission, 0, key_ref, cred, need_perm);