Re: [git pull] apparmor fix for __d_path() misuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2011 03:45 PM, Linus Torvalds wrote:
> On Tue, Dec 6, 2011 at 3:12 PM, John Johansen
> <john.johansen@xxxxxxxxxxxxx> 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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux