Skip to content

Commit

Permalink
Merge commit a4ae32c ("exec: Always set cap_ambient in cap_bprm_set_c…
Browse files Browse the repository at this point in the history
…reds")

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]>
  • Loading branch information
ebiederm committed May 28, 2020
2 parents 0115934 + a4ae32c commit e32f887
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions security/commoncap.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ int cap_bprm_repopulate_creds(struct linux_binprm *bprm)
int ret;
kuid_t root_uid;

new->cap_ambient = old->cap_ambient;
if (WARN_ON(!cap_ambient_invariant_ok(old)))
return -EPERM;

Expand Down

0 comments on commit e32f887

Please sign in to comment.