Skip to content
Commit ee67ae7e authored by Kees Cook's avatar Kees Cook
Browse files

commoncap: Move cap_elevated calculation into bprm_set_creds



Instead of a separate function, open-code the cap_elevated test, which
lets us entirely remove bprm->cap_effective (to use the local "effective"
variable instead), and more accurately examine euid/egid changes via the
existing local "is_setid".

The following LTP tests were run to validate the changes:

	# ./runltp -f syscalls -s cap
	# ./runltp -f securebits
	# ./runltp -f cap_bounds
	# ./runltp -f filecaps

All kernel selftests for capabilities and exec continue to pass as well.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarJames Morris <james.l.morris@oracle.com>
Acked-by: default avatarSerge Hallyn <serge@hallyn.com>
Reviewed-by: default avatarAndy Lutomirski <luto@kernel.org>
parent 46d98eb4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment