aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.h
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2011-09-10 02:25:58 -0400
committerJames Morris <jmorris@namei.org>2011-09-13 18:27:06 -0400
commit731d37aa70c7b9de3be6bf2c8287366223bf5ce5 (patch)
tree8ac6028511485862572695eb91e2d461e0636182 /security/tomoyo/common.h
parent1f067a682a9bd252107ac6f6946b7332fde42344 (diff)
TOMOYO: Allow domain transition without execve().
To be able to split permissions for Apache's CGI programs which are executed without execve(), add special domain transition which is performed by writing a TOMOYO's domainname to /sys/kernel/security/tomoyo/self_domain interface. This is an API for TOMOYO-aware userland applications. However, since I expect TOMOYO and other LSM modules to run in parallel, this patch does not use /proc/self/attr/ interface in order to avoid conflicts with other LSM modules when it became possible to run multiple LSM modules in parallel. 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.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h
index 435b3d869fc5..af82683df7ff 100644
--- a/security/tomoyo/common.h
+++ b/security/tomoyo/common.h
@@ -227,6 +227,7 @@ enum tomoyo_acl_entry_type_index {
227 TOMOYO_TYPE_INET_ACL, 227 TOMOYO_TYPE_INET_ACL,
228 TOMOYO_TYPE_UNIX_ACL, 228 TOMOYO_TYPE_UNIX_ACL,
229 TOMOYO_TYPE_ENV_ACL, 229 TOMOYO_TYPE_ENV_ACL,
230 TOMOYO_TYPE_MANUAL_TASK_ACL,
230}; 231};
231 232
232/* Index numbers for access controls with one pathname. */ 233/* Index numbers for access controls with one pathname. */
@@ -295,7 +296,6 @@ enum tomoyo_securityfs_interface_index {
295 TOMOYO_EXCEPTIONPOLICY, 296 TOMOYO_EXCEPTIONPOLICY,
296 TOMOYO_PROCESS_STATUS, 297 TOMOYO_PROCESS_STATUS,
297 TOMOYO_STAT, 298 TOMOYO_STAT,
298 TOMOYO_SELFDOMAIN,
299 TOMOYO_AUDIT, 299 TOMOYO_AUDIT,
300 TOMOYO_VERSION, 300 TOMOYO_VERSION,
301 TOMOYO_PROFILE, 301 TOMOYO_PROFILE,
@@ -480,6 +480,9 @@ struct tomoyo_request_info {
480 unsigned long flags; 480 unsigned long flags;
481 int need_dev; 481 int need_dev;
482 } mount; 482 } mount;
483 struct {
484 const struct tomoyo_path_info *domainname;
485 } task;
483 } param; 486 } param;
484 struct tomoyo_acl_info *matched_acl; 487 struct tomoyo_acl_info *matched_acl;
485 u8 param_type; 488 u8 param_type;
@@ -680,6 +683,15 @@ struct tomoyo_domain_info {
680}; 683};
681 684
682/* 685/*
686 * Structure for "task manual_domain_transition" directive.
687 */
688struct tomoyo_task_acl {
689 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_MANUAL_TASK_ACL */
690 /* Pointer to domainname. */
691 const struct tomoyo_path_info *domainname;
692};
693
694/*
683 * Structure for "file execute", "file read", "file write", "file append", 695 * Structure for "file execute", "file read", "file write", "file append",
684 * "file unlink", "file getattr", "file rmdir", "file truncate", 696 * "file unlink", "file getattr", "file rmdir", "file truncate",
685 * "file symlink", "file chroot" and "file unmount" directive. 697 * "file symlink", "file chroot" and "file unmount" directive.
@@ -935,6 +947,8 @@ const char *tomoyo_get_exe(void);
935const char *tomoyo_yesno(const unsigned int value); 947const char *tomoyo_yesno(const unsigned int value);
936const struct tomoyo_path_info *tomoyo_compare_name_union 948const struct tomoyo_path_info *tomoyo_compare_name_union
937(const struct tomoyo_path_info *name, const struct tomoyo_name_union *ptr); 949(const struct tomoyo_path_info *name, const struct tomoyo_name_union *ptr);
950const struct tomoyo_path_info *tomoyo_get_domainname
951(struct tomoyo_acl_param *param);
938const struct tomoyo_path_info *tomoyo_get_name(const char *name); 952const struct tomoyo_path_info *tomoyo_get_name(const char *name);
939const struct tomoyo_path_info *tomoyo_path_matches_group 953const struct tomoyo_path_info *tomoyo_path_matches_group
940(const struct tomoyo_path_info *pathname, const struct tomoyo_group *group); 954(const struct tomoyo_path_info *pathname, const struct tomoyo_group *group);