[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EDEAEA7.9060806@canonical.com>
Date: Tue, 06 Dec 2011 16:09:11 -0800
From: John Johansen <john.johansen@...onical.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [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
> <john.johansen@...onical.com> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists