Skip to content

Commit e32f887

Browse files
committed
Merge commit a4ae32c ("exec: Always set cap_ambient in cap_bprm_set_creds")
This is a bug fix and one of two places where I have found that the result of calling security_bprm_repopulate_creds more than once on different bprm->files depends on all of the bprm->files not just the file bprm->file. I intend to fix both of those cases and then modify the code to only call security_bprm_repopulate_creds on the final bprm file. So merge this change in so I hopefully reduce conflicts for others and I make it possible to build on top of this change. Signed-off-by: "Eric W. Biederman" <[email protected]>
2 parents 0115934 + a4ae32c commit e32f887

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

security/commoncap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ int cap_bprm_repopulate_creds(struct linux_binprm *bprm)
812812
int ret;
813813
kuid_t root_uid;
814814

815+
new->cap_ambient = old->cap_ambient;
815816
if (WARN_ON(!cap_ambient_invariant_ok(old)))
816817
return -EPERM;
817818

0 commit comments

Comments
 (0)