[lkml]   [2011]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [git pull] apparmor fix for __d_path() misuse
On 12/06/2011 03:45 PM, Linus Torvalds wrote:
> On Tue, Dec 6, 2011 at 3:12 PM, John Johansen
> <> wrote:
>> What we want to know is if we missed the supplied root, so that we don't
>> mediate off of that path. And it would be nice to get a partial path for
>> the purposes of logging, so that there is some guidance on how to update
>> policy.
> How about this change:
> - don't change 'root' (and mark it const)
> - if we hit the expected root, we're all happy and do what we do now
> - if we hit some *unexpected* root (the "global root") add a '?' or
> something at the head of the path.
> End result: callers like getcwd() can trivially replace their current
> "path_equal(&tmp,&root)" (or whatever they do) with just checking the
> first character of the end result. A good path always starts with '/'.
> Something kind of like this (this does *not* change apparmor or tomoyo
> - I didn't even look at those uses).
yes this would give apparmor what it needs. We would still have to break
one chroot case, until our labeling is properly updated. But its insane
to plan the api around that case as it is hardly used and a proper solution
for that case is in the works.

 \ /
  Last update: 2011-12-07 01:11    [W:0.074 / U:0.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site