apparmor/kernel-patches/for-mainline/parent-permission.diff

25 lines
675 B
Diff
Raw Normal View History

2007-05-10 09:40:12 +00:00
From: Andreas Gruenbacher <agruen@suse.de>
Subject: Allow permission functions to tell between parent and leaf checks
2007-05-10 09:40:12 +00:00
Set the LOOKUP_CONTINUE flag when checking parent permissions. This allows
permission functions to tell between parent and leaf checks.
2007-05-10 09:40:12 +00:00
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
2007-06-26 22:14:37 +00:00
Signed-off-by: John Johansen <jjohansen@suse.de>
2007-05-10 09:40:12 +00:00
2007-05-12 18:28:28 +00:00
---
2007-11-21 08:51:45 +00:00
fs/namei.c | 2 ++
1 file changed, 2 insertions(+)
2007-05-12 18:28:28 +00:00
2007-05-09 13:34:01 +00:00
--- a/fs/namei.c
+++ b/fs/namei.c
2007-11-21 08:51:45 +00:00
@@ -1508,6 +1508,8 @@ static inline int may_create(struct inod
2007-05-09 13:34:01 +00:00
return -EEXIST;
if (IS_DEADDIR(dir))
return -ENOENT;
+ if (nd)
+ nd->flags |= LOOKUP_CONTINUE;
return permission(dir,MAY_WRITE | MAY_EXEC, nd);
}