diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2009-12-02 07:09:48 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-12-07 22:58:05 -0500 |
commit | 937bf6133b21b16965f75223085f4314ae32b8eb (patch) | |
tree | 4a042bc9298ffddfaf4017a5796cae46e9594d2c /security/tomoyo/common.h | |
parent | 5d0901a3a0c39c97ca504f73d24030f63cfc9fa2 (diff) |
TOMOYO: Add rest of file operation restrictions.
LSM hooks for chmod()/chown()/chroot() are now ready.
This patch utilizes these hooks.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/common.h')
-rw-r--r-- | security/tomoyo/common.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 92169d29b2db..bd10f9fa3511 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -108,7 +108,7 @@ struct tomoyo_path_info_with_data { | |||
108 | * (b) type & 0x80 : whether the entry is marked as "deleted". | 108 | * (b) type & 0x80 : whether the entry is marked as "deleted". |
109 | * | 109 | * |
110 | * Packing "struct tomoyo_acl_info" allows | 110 | * Packing "struct tomoyo_acl_info" allows |
111 | * "struct tomoyo_single_path_acl_record" to embed "u16" and | 111 | * "struct tomoyo_single_path_acl_record" to embed "u8" + "u16" and |
112 | * "struct tomoyo_double_path_acl_record" to embed "u8" | 112 | * "struct tomoyo_double_path_acl_record" to embed "u8" |
113 | * without enlarging their structure size. | 113 | * without enlarging their structure size. |
114 | */ | 114 | */ |
@@ -184,10 +184,13 @@ struct tomoyo_domain_info { | |||
184 | * Directives held by this structure are "allow_read/write", "allow_execute", | 184 | * Directives held by this structure are "allow_read/write", "allow_execute", |
185 | * "allow_read", "allow_write", "allow_create", "allow_unlink", "allow_mkdir", | 185 | * "allow_read", "allow_write", "allow_create", "allow_unlink", "allow_mkdir", |
186 | * "allow_rmdir", "allow_mkfifo", "allow_mksock", "allow_mkblock", | 186 | * "allow_rmdir", "allow_mkfifo", "allow_mksock", "allow_mkblock", |
187 | * "allow_mkchar", "allow_truncate", "allow_symlink" and "allow_rewrite". | 187 | * "allow_mkchar", "allow_truncate", "allow_symlink", "allow_rewrite", |
188 | * "allow_chmod", "allow_chown", "allow_chgrp", "allow_chroot", "allow_mount" | ||
189 | * and "allow_unmount". | ||
188 | */ | 190 | */ |
189 | struct tomoyo_single_path_acl_record { | 191 | struct tomoyo_single_path_acl_record { |
190 | struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_SINGLE_PATH_ACL */ | 192 | struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_SINGLE_PATH_ACL */ |
193 | u8 perm_high; | ||
191 | u16 perm; | 194 | u16 perm; |
192 | /* Pointer to single pathname. */ | 195 | /* Pointer to single pathname. */ |
193 | const struct tomoyo_path_info *filename; | 196 | const struct tomoyo_path_info *filename; |
@@ -195,7 +198,7 @@ struct tomoyo_single_path_acl_record { | |||
195 | 198 | ||
196 | /* | 199 | /* |
197 | * tomoyo_double_path_acl_record is a structure which is used for holding an | 200 | * tomoyo_double_path_acl_record is a structure which is used for holding an |
198 | * entry with two pathnames operation (i.e. link() and rename()). | 201 | * entry with two pathnames operation (i.e. link(), rename() and pivot_root()). |
199 | * It has following fields. | 202 | * It has following fields. |
200 | * | 203 | * |
201 | * (1) "head" which is a "struct tomoyo_acl_info". | 204 | * (1) "head" which is a "struct tomoyo_acl_info". |
@@ -203,7 +206,8 @@ struct tomoyo_single_path_acl_record { | |||
203 | * (3) "filename1" is the source/old pathname. | 206 | * (3) "filename1" is the source/old pathname. |
204 | * (4) "filename2" is the destination/new pathname. | 207 | * (4) "filename2" is the destination/new pathname. |
205 | * | 208 | * |
206 | * Directives held by this structure are "allow_rename" and "allow_link". | 209 | * Directives held by this structure are "allow_rename", "allow_link" and |
210 | * "allow_pivot_root". | ||
207 | */ | 211 | */ |
208 | struct tomoyo_double_path_acl_record { | 212 | struct tomoyo_double_path_acl_record { |
209 | struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_DOUBLE_PATH_ACL */ | 213 | struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_DOUBLE_PATH_ACL */ |