lkml.org 
[lkml]   [2007]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[AppArmor 36/47] Allow permission functions to tell between parent and leaf checks
    Set the LOOKUP_CONTINUE flag when checking parent permissions. This allows
    permission functions to tell between parent and leaf checks.

    Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
    Signed-off-by: John Johansen <jjohansen@suse.de>

    ---
    fs/namei.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/fs/namei.c
    +++ b/fs/namei.c
    @@ -1511,6 +1511,8 @@ static inline int may_create(struct inod
    return -EEXIST;
    if (IS_DEADDIR(dir))
    return -ENOENT;
    + if (nd)
    + nd->flags |= LOOKUP_CONTINUE;
    return permission(dir,MAY_WRITE | MAY_EXEC, nd);
    }

    --



    \
     
     \ /
      Last update: 2007-12-20 15:30    [W:0.019 / U:31.196 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site