diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-06-16 03:21:36 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:34:32 -0400 |
commit | cf6e9a6468ec82a94cbc707b607452ec4454182c (patch) | |
tree | 6b289c8575f1915395d3c1348d473ab07fbe34a8 /security/tomoyo/common.h | |
parent | 05336dee9f5a23c042e5938b42f996dd35e31ee6 (diff) |
TOMOYO: Pass parameters via structure.
To make it possible to use callback function, pass parameters via
"struct tomoyo_request_info".
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 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 203454025410..f055e273ec02 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -212,6 +212,39 @@ struct tomoyo_acl_head { | |||
212 | */ | 212 | */ |
213 | struct tomoyo_request_info { | 213 | struct tomoyo_request_info { |
214 | struct tomoyo_domain_info *domain; | 214 | struct tomoyo_domain_info *domain; |
215 | /* For holding parameters. */ | ||
216 | union { | ||
217 | struct { | ||
218 | const struct tomoyo_path_info *filename; | ||
219 | u8 operation; | ||
220 | } path; | ||
221 | struct { | ||
222 | const struct tomoyo_path_info *filename1; | ||
223 | const struct tomoyo_path_info *filename2; | ||
224 | u8 operation; | ||
225 | } path2; | ||
226 | struct { | ||
227 | const struct tomoyo_path_info *filename; | ||
228 | unsigned int mode; | ||
229 | unsigned int major; | ||
230 | unsigned int minor; | ||
231 | u8 operation; | ||
232 | } mkdev; | ||
233 | struct { | ||
234 | const struct tomoyo_path_info *filename; | ||
235 | unsigned long number; | ||
236 | u8 operation; | ||
237 | } path_number; | ||
238 | struct { | ||
239 | const struct tomoyo_path_info *type; | ||
240 | const struct tomoyo_path_info *dir; | ||
241 | const struct tomoyo_path_info *dev; | ||
242 | unsigned long flags; | ||
243 | int need_dev; | ||
244 | } mount; | ||
245 | } param; | ||
246 | u8 param_type; | ||
247 | bool granted; | ||
215 | u8 retry; | 248 | u8 retry; |
216 | u8 profile; | 249 | u8 profile; |
217 | u8 mode; /* One of tomoyo_mode_index . */ | 250 | u8 mode; /* One of tomoyo_mode_index . */ |