/* The credentials have been committed by this point, and so are no longer available through @bprm->cred.  */
int cap_bprm_secureexec(struct linux_binprm *bprm)
/* The credentials have been committed by this point, and so are no longer available through @bprm->cred.  */
int cap_bprm_secureexec(struct linux_binprm *bprm)
{
	const struct cred *cred = current_cred();
	if (cred->uid != 0) {
		if (bprm->cap_effective)
			return 1;
		if (!cap_isclear(cred->cap_permitted))
			return 1;
	}
	return (cred->euid != cred->uid ||
		cred->egid != cred->gid);
}