aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/common.h')
-rw-r--r--security/tomoyo/common.h29
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 {
673extern asmlinkage long sys_getpid(void); 673extern asmlinkage long sys_getpid(void);
674extern asmlinkage long sys_getppid(void); 674extern asmlinkage long sys_getppid(void);
675 675
676/* Check whether the given string starts with the given keyword. */
677bool tomoyo_str_starts(char **src, const char *find);
678/* Get tomoyo_realpath() of current process. */
679const char *tomoyo_get_exe(void);
680/* Format string. */
681void tomoyo_normalize_line(unsigned char *buffer);
682/* Print warning or error message on console. */
683void 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. */
686void tomoyo_check_profile(void);
687/* Open operation for /sys/kernel/security/tomoyo/ interface. */
688int tomoyo_open_control(const u8 type, struct file *file);
689/* Close /sys/kernel/security/tomoyo/ interface. */
690int tomoyo_close_control(struct file *file);
691/* Read operation for /sys/kernel/security/tomoyo/ interface. */
692int tomoyo_read_control(struct file *file, char __user *buffer,
693 const int buffer_len);
694/* Write operation for /sys/kernel/security/tomoyo/ interface. */
695int 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. */
698bool tomoyo_domain_quota_is_ok(struct tomoyo_request_info *r);
699/* Print out of memory warning message. */
700void 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. */
677bool tomoyo_compare_name_union(const struct tomoyo_path_info *name, 702bool 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. */
838int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head); 863int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head);
839 864
840/* Initialize realpath related code. */ 865/* Initialize mm related code. */
841void __init tomoyo_realpath_init(void); 866void __init tomoyo_mm_init(void);
842int tomoyo_check_exec_perm(struct tomoyo_domain_info *domain, 867int tomoyo_check_exec_perm(struct tomoyo_domain_info *domain,
843 const struct tomoyo_path_info *filename); 868 const struct tomoyo_path_info *filename);
844int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, 869int tomoyo_check_open_permission(struct tomoyo_domain_info *domain,