From cf6e9a6468ec82a94cbc707b607452ec4454182c Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Wed, 16 Jun 2010 16:21:36 +0900 Subject: 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 Signed-off-by: James Morris --- security/tomoyo/common.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'security/tomoyo/common.h') diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 2034540..f055e27 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h @@ -212,6 +212,39 @@ struct tomoyo_acl_head { */ struct tomoyo_request_info { struct tomoyo_domain_info *domain; + /* For holding parameters. */ + union { + struct { + const struct tomoyo_path_info *filename; + u8 operation; + } path; + struct { + const struct tomoyo_path_info *filename1; + const struct tomoyo_path_info *filename2; + u8 operation; + } path2; + struct { + const struct tomoyo_path_info *filename; + unsigned int mode; + unsigned int major; + unsigned int minor; + u8 operation; + } mkdev; + struct { + const struct tomoyo_path_info *filename; + unsigned long number; + u8 operation; + } path_number; + struct { + const struct tomoyo_path_info *type; + const struct tomoyo_path_info *dir; + const struct tomoyo_path_info *dev; + unsigned long flags; + int need_dev; + } mount; + } param; + u8 param_type; + bool granted; u8 retry; u8 profile; u8 mode; /* One of tomoyo_mode_index . */ -- cgit v1.1