diff options
| author | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
| commit | cb5629b10d64a8006622ce3a52bc887d91057d69 (patch) | |
| tree | 7c06d8f30783115e3384721046258ce615b129c5 /include/linux/node.h | |
| parent | 8920d5ad6ba74ae8ab020e90cc4d976980e68701 (diff) | |
| parent | f01d1d546abb2f4028b5299092f529eefb01253a (diff) | |
Merge branch 'master' into next
Conflicts:
fs/namei.c
Manually merged per:
diff --cc fs/namei.c
index 734f2b5,bbc15c2..0000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -860,9 -848,8 +849,10 @@@ static int __link_path_walk(const char
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
if (err == -EAGAIN)
- err = vfs_permission(nd, MAY_EXEC);
+ err = inode_permission(nd->path.dentry->d_inode,
+ MAY_EXEC);
+ if (!err)
+ err = ima_path_check(&nd->path, MAY_EXEC);
if (err)
break;
@@@ -1525,14 -1506,9 +1509,14 @@@ int may_open(struct path *path, int acc
flag &= ~O_TRUNC;
}
- error = vfs_permission(nd, acc_mode);
+ error = inode_permission(inode, acc_mode);
if (error)
return error;
+
- error = ima_path_check(&nd->path,
++ error = ima_path_check(path,
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC));
+ if (error)
+ return error;
/*
* An append-only file must be opened in append mode for writing.
*/
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux/node.h')
| -rw-r--r-- | include/linux/node.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/node.h b/include/linux/node.h index bc001bc225c3..681a697b9a86 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
| @@ -26,6 +26,7 @@ struct node { | |||
| 26 | struct sys_device sysdev; | 26 | struct sys_device sysdev; |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | struct memory_block; | ||
| 29 | extern struct node node_devices[]; | 30 | extern struct node node_devices[]; |
| 30 | 31 | ||
| 31 | extern int register_node(struct node *, int, struct node *); | 32 | extern int register_node(struct node *, int, struct node *); |
| @@ -35,6 +36,9 @@ extern int register_one_node(int nid); | |||
| 35 | extern void unregister_one_node(int nid); | 36 | extern void unregister_one_node(int nid); |
| 36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | 37 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); |
| 37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | 38 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); |
| 39 | extern int register_mem_sect_under_node(struct memory_block *mem_blk, | ||
| 40 | int nid); | ||
| 41 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk); | ||
| 38 | #else | 42 | #else |
| 39 | static inline int register_one_node(int nid) | 43 | static inline int register_one_node(int nid) |
| 40 | { | 44 | { |
| @@ -52,6 +56,15 @@ static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | |||
| 52 | { | 56 | { |
| 53 | return 0; | 57 | return 0; |
| 54 | } | 58 | } |
| 59 | static inline int register_mem_sect_under_node(struct memory_block *mem_blk, | ||
| 60 | int nid) | ||
| 61 | { | ||
| 62 | return 0; | ||
| 63 | } | ||
| 64 | static inline int unregister_mem_sect_under_nodes(struct memory_block *mem_blk) | ||
| 65 | { | ||
| 66 | return 0; | ||
| 67 | } | ||
| 55 | #endif | 68 | #endif |
| 56 | 69 | ||
| 57 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 70 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
