~apparmor-dev/apparmor/2_3

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/parent-permission.diff

  • Committer: jrjohansen
  • Date: 2008-05-27 12:04:33 UTC
  • Revision ID: svn-v4:40609528-9d10-0410-9bd8-e926d5471da9:branches/2_3:1265
remove for-mainline dir from kernel patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Andreas Gruenbacher <agruen@suse.de>
2
 
Subject: Allow permission functions to tell between parent and leaf checks
3
 
 
4
 
Set the LOOKUP_CONTINUE flag when checking parent permissions. This allows
5
 
permission functions to tell between parent and leaf checks.
6
 
 
7
 
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
8
 
Signed-off-by: John Johansen <jjohansen@suse.de>
9
 
 
10
 
---
11
 
 fs/namei.c |    2 ++
12
 
 1 file changed, 2 insertions(+)
13
 
 
14
 
--- a/fs/namei.c
15
 
+++ b/fs/namei.c
16
 
@@ -1508,6 +1508,8 @@ static inline int may_create(struct inod
17
 
                return -EEXIST;
18
 
        if (IS_DEADDIR(dir))
19
 
                return -ENOENT;
20
 
+       if (nd)
21
 
+               nd->flags |= LOOKUP_CONTINUE;
22
 
        return permission(dir,MAY_WRITE | MAY_EXEC, nd);
23
 
 }
24