diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-25 14:41:28 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-28 00:47:23 -0400 |
commit | e6641eddf0e7f0227493e91a1d91546f6bd73525 (patch) | |
tree | 14d83c8cfd2962485ecc374fcaad94fab172567c /security/tomoyo | |
parent | 928e1ebfb576f6c0480ac852becfc142b248242c (diff) |
tomoyo: constify assorted struct path *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/tomoyo')
-rw-r--r-- | security/tomoyo/common.h | 12 | ||||
-rw-r--r-- | security/tomoyo/file.c | 10 | ||||
-rw-r--r-- | security/tomoyo/mount.c | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index f9c9fb1d56b4..361e7a284699 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -957,7 +957,7 @@ const struct tomoyo_path_info *tomoyo_get_name(const char *name); | |||
957 | const struct tomoyo_path_info *tomoyo_path_matches_group | 957 | const struct tomoyo_path_info *tomoyo_path_matches_group |
958 | (const struct tomoyo_path_info *pathname, const struct tomoyo_group *group); | 958 | (const struct tomoyo_path_info *pathname, const struct tomoyo_group *group); |
959 | int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, | 959 | int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, |
960 | struct path *path, const int flag); | 960 | const struct path *path, const int flag); |
961 | void tomoyo_close_control(struct tomoyo_io_buffer *head); | 961 | void tomoyo_close_control(struct tomoyo_io_buffer *head); |
962 | int tomoyo_env_perm(struct tomoyo_request_info *r, const char *env); | 962 | int tomoyo_env_perm(struct tomoyo_request_info *r, const char *env); |
963 | int tomoyo_execute_permission(struct tomoyo_request_info *r, | 963 | int tomoyo_execute_permission(struct tomoyo_request_info *r, |
@@ -968,15 +968,15 @@ int tomoyo_get_mode(const struct tomoyo_policy_namespace *ns, const u8 profile, | |||
968 | int tomoyo_init_request_info(struct tomoyo_request_info *r, | 968 | int tomoyo_init_request_info(struct tomoyo_request_info *r, |
969 | struct tomoyo_domain_info *domain, | 969 | struct tomoyo_domain_info *domain, |
970 | const u8 index); | 970 | const u8 index); |
971 | int tomoyo_mkdev_perm(const u8 operation, struct path *path, | 971 | int tomoyo_mkdev_perm(const u8 operation, const struct path *path, |
972 | const unsigned int mode, unsigned int dev); | 972 | const unsigned int mode, unsigned int dev); |
973 | int tomoyo_mount_permission(const char *dev_name, struct path *path, | 973 | int tomoyo_mount_permission(const char *dev_name, const struct path *path, |
974 | const char *type, unsigned long flags, | 974 | const char *type, unsigned long flags, |
975 | void *data_page); | 975 | void *data_page); |
976 | int tomoyo_open_control(const u8 type, struct file *file); | 976 | int tomoyo_open_control(const u8 type, struct file *file); |
977 | int tomoyo_path2_perm(const u8 operation, struct path *path1, | 977 | int tomoyo_path2_perm(const u8 operation, const struct path *path1, |
978 | struct path *path2); | 978 | const struct path *path2); |
979 | int tomoyo_path_number_perm(const u8 operation, struct path *path, | 979 | int tomoyo_path_number_perm(const u8 operation, const struct path *path, |
980 | unsigned long number); | 980 | unsigned long number); |
981 | int tomoyo_path_perm(const u8 operation, const struct path *path, | 981 | int tomoyo_path_perm(const u8 operation, const struct path *path, |
982 | const char *target); | 982 | const char *target); |
diff --git a/security/tomoyo/file.c b/security/tomoyo/file.c index 2367b100cc62..7041a580019e 100644 --- a/security/tomoyo/file.c +++ b/security/tomoyo/file.c | |||
@@ -687,7 +687,7 @@ static int tomoyo_update_path_number_acl(const u8 perm, | |||
687 | * | 687 | * |
688 | * Returns 0 on success, negative value otherwise. | 688 | * Returns 0 on success, negative value otherwise. |
689 | */ | 689 | */ |
690 | int tomoyo_path_number_perm(const u8 type, struct path *path, | 690 | int tomoyo_path_number_perm(const u8 type, const struct path *path, |
691 | unsigned long number) | 691 | unsigned long number) |
692 | { | 692 | { |
693 | struct tomoyo_request_info r; | 693 | struct tomoyo_request_info r; |
@@ -733,7 +733,7 @@ int tomoyo_path_number_perm(const u8 type, struct path *path, | |||
733 | * Returns 0 on success, negative value otherwise. | 733 | * Returns 0 on success, negative value otherwise. |
734 | */ | 734 | */ |
735 | int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, | 735 | int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, |
736 | struct path *path, const int flag) | 736 | const struct path *path, const int flag) |
737 | { | 737 | { |
738 | const u8 acc_mode = ACC_MODE(flag); | 738 | const u8 acc_mode = ACC_MODE(flag); |
739 | int error = 0; | 739 | int error = 0; |
@@ -838,7 +838,7 @@ int tomoyo_path_perm(const u8 operation, const struct path *path, const char *ta | |||
838 | * | 838 | * |
839 | * Returns 0 on success, negative value otherwise. | 839 | * Returns 0 on success, negative value otherwise. |
840 | */ | 840 | */ |
841 | int tomoyo_mkdev_perm(const u8 operation, struct path *path, | 841 | int tomoyo_mkdev_perm(const u8 operation, const struct path *path, |
842 | const unsigned int mode, unsigned int dev) | 842 | const unsigned int mode, unsigned int dev) |
843 | { | 843 | { |
844 | struct tomoyo_request_info r; | 844 | struct tomoyo_request_info r; |
@@ -882,8 +882,8 @@ int tomoyo_mkdev_perm(const u8 operation, struct path *path, | |||
882 | * | 882 | * |
883 | * Returns 0 on success, negative value otherwise. | 883 | * Returns 0 on success, negative value otherwise. |
884 | */ | 884 | */ |
885 | int tomoyo_path2_perm(const u8 operation, struct path *path1, | 885 | int tomoyo_path2_perm(const u8 operation, const struct path *path1, |
886 | struct path *path2) | 886 | const struct path *path2) |
887 | { | 887 | { |
888 | int error = -ENOMEM; | 888 | int error = -ENOMEM; |
889 | struct tomoyo_path_info buf1; | 889 | struct tomoyo_path_info buf1; |
diff --git a/security/tomoyo/mount.c b/security/tomoyo/mount.c index 390c646013cb..14b53fb2a0cf 100644 --- a/security/tomoyo/mount.c +++ b/security/tomoyo/mount.c | |||
@@ -73,7 +73,7 @@ static bool tomoyo_check_mount_acl(struct tomoyo_request_info *r, | |||
73 | */ | 73 | */ |
74 | static int tomoyo_mount_acl(struct tomoyo_request_info *r, | 74 | static int tomoyo_mount_acl(struct tomoyo_request_info *r, |
75 | const char *dev_name, | 75 | const char *dev_name, |
76 | struct path *dir, const char *type, | 76 | const struct path *dir, const char *type, |
77 | unsigned long flags) | 77 | unsigned long flags) |
78 | { | 78 | { |
79 | struct tomoyo_obj_info obj = { }; | 79 | struct tomoyo_obj_info obj = { }; |
@@ -184,7 +184,7 @@ static int tomoyo_mount_acl(struct tomoyo_request_info *r, | |||
184 | * | 184 | * |
185 | * Returns 0 on success, negative value otherwise. | 185 | * Returns 0 on success, negative value otherwise. |
186 | */ | 186 | */ |
187 | int tomoyo_mount_permission(const char *dev_name, struct path *path, | 187 | int tomoyo_mount_permission(const char *dev_name, const struct path *path, |
188 | const char *type, unsigned long flags, | 188 | const char *type, unsigned long flags, |
189 | void *data_page) | 189 | void *data_page) |
190 | { | 190 | { |