diff options
Diffstat (limited to 'security/tomoyo/common.h')
-rw-r--r-- | security/tomoyo/common.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index dc5f98f52f61..be03e4a21db0 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -673,6 +673,31 @@ struct tomoyo_policy_manager_entry { | |||
673 | extern asmlinkage long sys_getpid(void); | 673 | extern asmlinkage long sys_getpid(void); |
674 | extern asmlinkage long sys_getppid(void); | 674 | extern asmlinkage long sys_getppid(void); |
675 | 675 | ||
676 | /* Check whether the given string starts with the given keyword. */ | ||
677 | bool tomoyo_str_starts(char **src, const char *find); | ||
678 | /* Get tomoyo_realpath() of current process. */ | ||
679 | const char *tomoyo_get_exe(void); | ||
680 | /* Format string. */ | ||
681 | void tomoyo_normalize_line(unsigned char *buffer); | ||
682 | /* Print warning or error message on console. */ | ||
683 | void tomoyo_warn_log(struct tomoyo_request_info *r, const char *fmt, ...) | ||
684 | __attribute__ ((format(printf, 2, 3))); | ||
685 | /* Check all profiles currently assigned to domains are defined. */ | ||
686 | void tomoyo_check_profile(void); | ||
687 | /* Open operation for /sys/kernel/security/tomoyo/ interface. */ | ||
688 | int tomoyo_open_control(const u8 type, struct file *file); | ||
689 | /* Close /sys/kernel/security/tomoyo/ interface. */ | ||
690 | int tomoyo_close_control(struct file *file); | ||
691 | /* Read operation for /sys/kernel/security/tomoyo/ interface. */ | ||
692 | int tomoyo_read_control(struct file *file, char __user *buffer, | ||
693 | const int buffer_len); | ||
694 | /* Write operation for /sys/kernel/security/tomoyo/ interface. */ | ||
695 | int tomoyo_write_control(struct file *file, const char __user *buffer, | ||
696 | const int buffer_len); | ||
697 | /* Check whether the domain has too many ACL entries to hold. */ | ||
698 | bool tomoyo_domain_quota_is_ok(struct tomoyo_request_info *r); | ||
699 | /* Print out of memory warning message. */ | ||
700 | void tomoyo_warn_oom(const char *function); | ||
676 | /* Check whether the given name matches the given name_union. */ | 701 | /* Check whether the given name matches the given name_union. */ |
677 | bool tomoyo_compare_name_union(const struct tomoyo_path_info *name, | 702 | bool tomoyo_compare_name_union(const struct tomoyo_path_info *name, |
678 | const struct tomoyo_name_union *ptr); | 703 | const struct tomoyo_name_union *ptr); |
@@ -837,8 +862,8 @@ int tomoyo_read_memory_counter(struct tomoyo_io_buffer *head); | |||
837 | /* Set memory quota. */ | 862 | /* Set memory quota. */ |
838 | int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head); | 863 | int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head); |
839 | 864 | ||
840 | /* Initialize realpath related code. */ | 865 | /* Initialize mm related code. */ |
841 | void __init tomoyo_realpath_init(void); | 866 | void __init tomoyo_mm_init(void); |
842 | int tomoyo_check_exec_perm(struct tomoyo_domain_info *domain, | 867 | int tomoyo_check_exec_perm(struct tomoyo_domain_info *domain, |
843 | const struct tomoyo_path_info *filename); | 868 | const struct tomoyo_path_info *filename); |
844 | int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, | 869 | int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, |