/* prepare a new set of credentials for modification  */
static int selinux_cred_prepare(struct cred *new, const struct cred *old, gfp_t gfp)
/* prepare a new set of credentials for modification  */
static int selinux_cred_prepare(struct cred *new, const struct cred *old, gfp_t gfp)
{
	const struct task_security_struct *old_tsec;
	struct task_security_struct *tsec;
	old_tsec = old->security;
	tsec = kmemdup(old_tsec, sizeof(struct task_security_struct), gfp);
	if (!tsec)
		return -ENOMEM;
	new->security = tsec;
	return 0;
}