capabilities: factor out cap_bprm_set_creds privileged root
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 12 Oct 2017 00:57:05 +0000 (20:57 -0400)
committerJames Morris <james.l.morris@oracle.com>
Fri, 20 Oct 2017 04:22:43 +0000 (15:22 +1100)
commitdb1a8922cf3f0b936595ba41774fe4b66adf091a
tree4037669ca131379ee303fa457b461e6ba8c542f7
parent33957a104c86985f087b08a363590a948c9ff08c
capabilities: factor out cap_bprm_set_creds privileged root

Factor out the case of privileged root from the function
cap_bprm_set_creds() to make the latter easier to read and analyse.

Suggested-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Acked-by: James Morris <james.l.morris@oracle.com>
Acked-by: Kees Cook <keescook@chromium.org>
Okay-ished-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/commoncap.c