diff options
Diffstat (limited to 'security/tomoyo/file.c')
-rw-r--r-- | security/tomoyo/file.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/security/tomoyo/file.c b/security/tomoyo/file.c index 31a9a4ab7af9..743c35f5084a 100644 --- a/security/tomoyo/file.c +++ b/security/tomoyo/file.c | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * security/tomoyo/file.c | 2 | * security/tomoyo/file.c |
3 | * | 3 | * |
4 | * Pathname restriction functions. | 4 | * Copyright (C) 2005-2011 NTT DATA CORPORATION |
5 | * | ||
6 | * Copyright (C) 2005-2010 NTT DATA CORPORATION | ||
7 | */ | 5 | */ |
8 | 6 | ||
9 | #include "common.h" | 7 | #include "common.h" |
@@ -154,7 +152,7 @@ static bool tomoyo_get_realpath(struct tomoyo_path_info *buf, struct path *path) | |||
154 | tomoyo_fill_path_info(buf); | 152 | tomoyo_fill_path_info(buf); |
155 | return true; | 153 | return true; |
156 | } | 154 | } |
157 | return false; | 155 | return false; |
158 | } | 156 | } |
159 | 157 | ||
160 | /** | 158 | /** |
@@ -883,16 +881,16 @@ int tomoyo_path2_perm(const u8 operation, struct path *path1, | |||
883 | switch (operation) { | 881 | switch (operation) { |
884 | struct dentry *dentry; | 882 | struct dentry *dentry; |
885 | case TOMOYO_TYPE_RENAME: | 883 | case TOMOYO_TYPE_RENAME: |
886 | case TOMOYO_TYPE_LINK: | 884 | case TOMOYO_TYPE_LINK: |
887 | dentry = path1->dentry; | 885 | dentry = path1->dentry; |
888 | if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode)) | 886 | if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode)) |
889 | break; | 887 | break; |
890 | /* fall through */ | 888 | /* fall through */ |
891 | case TOMOYO_TYPE_PIVOT_ROOT: | 889 | case TOMOYO_TYPE_PIVOT_ROOT: |
892 | tomoyo_add_slash(&buf1); | 890 | tomoyo_add_slash(&buf1); |
893 | tomoyo_add_slash(&buf2); | 891 | tomoyo_add_slash(&buf2); |
894 | break; | 892 | break; |
895 | } | 893 | } |
896 | r.obj = &obj; | 894 | r.obj = &obj; |
897 | r.param_type = TOMOYO_TYPE_PATH2_ACL; | 895 | r.param_type = TOMOYO_TYPE_PATH2_ACL; |
898 | r.param.path2.operation = operation; | 896 | r.param.path2.operation = operation; |