lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] Please pull exec fix for v5.7
On Tue, May 26, 2020 at 1:36 PM Eric W. Biederman <ebiederm@xmission.com> wrote:
>
> I don't see us touching cap_ambient anywhere except the line that does:
>
> /* File caps or setid cancels ambient. */
> if (has_fcap || is_setid)
> cap_clear(new->cap_ambient);

That's the one I was thinking of.

I think it would have made more sense to simply initialize it there
and have all accesses to cap_ambient in one place.

The (even better?) alternative would have been to simply just always
re-initialize it in the caller.

If this is about interpreter vs scripts, I really find it confusing
how we make these kinds of re-initializations at the security layer
that doesn't know about one vs the other.. Yes, in your cleanup
branch, the "primary" thing becomes more clear, but it very much is
_not_ clear within the context of this patch.

Hmm?

Linus

\
 
 \ /
  Last update: 2020-05-26 23:33    [W:0.882 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site