Lines Matching defs:cred

424 static void __init lsm_early_cred(struct cred *cred);

467 init_debug("cred blob size = %d\n", blob_sizes.lbs_cred);
496 lsm_early_cred((struct cred *) current->cred);
691 * lsm_cred_alloc - allocate a composite cred blob
692 * @cred: the cred that needs a blob
695 * Allocate the cred blob for all the modules
699 static int lsm_cred_alloc(struct cred *cred, gfp_t gfp)
701 return lsm_blob_alloc(&cred->security, blob_sizes.lbs_cred, gfp);
705 * lsm_early_cred - during initialization allocate a composite cred blob
706 * @cred: the cred that needs a blob
708 * Allocate the cred blob for all the modules
710 static void __init lsm_early_cred(struct cred *cred)
712 int rc = lsm_cred_alloc(cred, GFP_KERNEL);
715 panic("%s: Early cred alloc failed.\n", __func__);
995 int security_binder_set_context_mgr(const struct cred *mgr)
1009 int security_binder_transaction(const struct cred *from,
1010 const struct cred *to)
1024 int security_binder_transfer_binder(const struct cred *from,
1025 const struct cred *to)
1040 int security_binder_transfer_file(const struct cred *from,
1041 const struct cred *to, const struct file *file)
1115 int security_capset(struct cred *new, const struct cred *old,
1126 * @cred: credentials to examine
1137 int security_capable(const struct cred *cred,
1142 return call_int_hook(capable, cred, ns, cap, opts);
1243 * If the setup in prepare_exec_creds did not setup @bprm->cred->security
1245 * @bprm->cred->security to be what commit_creds needs to install for the new
1255 * This hook must not change current->cred, only @bprm->cred.
1270 * exec, update @bprm->cred to reflect that change. This is called after
1293 * It allows a check against the @bprm->cred->security value which was set in
1311 * by @current->cred and the information set in @bprm->cred by the
1323 * security_bprm_committed_creds() - Tidy up after cred install during exec()
1328 * point, been set to @current->cred. @bprm points to the linux_binprm
1779 const struct cred *old, struct cred *new)
2786 int security_inode_copy_up(struct dentry *src, struct cred **new)
3217 * @cred: credentials
3220 * Only allocate sufficient memory and attach to @cred such that
3225 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp)
3227 int rc = lsm_cred_alloc(cred, gfp);
3232 rc = call_int_hook(cred_alloc_blank, cred, gfp);
3234 security_cred_free(cred);
3239 * security_cred_free() - Free the cred's LSM blob and associated resources
3240 * @cred: credentials
3242 * Deallocate and clear the cred->security field in a set of credentials.
3244 void security_cred_free(struct cred *cred)
3250 if (unlikely(cred->security == NULL))
3253 call_void_hook(cred_free, cred);
3255 kfree(cred->security);
3256 cred->security = NULL;
3269 int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp)
3289 void security_transfer_creds(struct cred *new, const struct cred *old)
3299 * Retrieve the security identifier of the cred structure @c. In case of
3302 void security_cred_getsecid(const struct cred *c, u32 *secid)
3314 * Retrieve the security data of the cred structure @c. In case of
3317 void security_cred_getlsmprop(const struct cred *c, struct lsm_prop *prop)
3334 int security_kernel_act_as(struct cred *new, u32 secid)
3350 int security_kernel_create_files_as(struct cred *new, struct inode *inode)
3453 * rather than to @current->cred.
3457 int security_task_fix_setuid(struct cred *new, const struct cred *old,
3473 * @current->cred.
3477 int security_task_fix_setgid(struct cred *new, const struct cred *old,
3491 * @current->cred.
3495 int security_task_fix_setgroups(struct cred *new, const struct cred *old)
3614 * @cred: current task credentials
3623 int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
3626 return call_int_hook(task_prlimit, cred, tcred, flags);
3692 * @cred: credentials of the signal sender, NULL if @current
3703 int sig, const struct cred *cred)
3705 return call_int_hook(task_kill, p, info, sig, cred);
3755 * @cred: prepared creds
3761 int security_create_user_ns(const struct cred *cred)
3763 return call_int_hook(userns_create, cred);
4466 * @cred: credentials of the task which triggered the watch
4473 int security_post_notification(const struct cred *w_cred,
4474 const struct cred *cred,
4477 return call_int_hook(post_notification, w_cred, cred, n);
5500 * @cred: credentials
5508 int security_key_alloc(struct key *key, const struct cred *cred,
5515 rc = call_int_hook(key_alloc, key, cred, flags);
5536 * @cred: credentials of actor requesting access
5543 int security_key_permission(key_ref_t key_ref, const struct cred *cred,
5546 return call_int_hook(key_permission, key_ref, cred, need_perm);
6004 int security_uring_override_creds(const struct cred *new)