diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-06-16 03:23:55 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:34:33 -0400 |
commit | 75093152a97ee0ec281895b4f6229ff3c481fd64 (patch) | |
tree | 960bdf1d441f43c2dfa3c4d54c48af5fc524a1a8 /security/tomoyo/common.h | |
parent | 99a852596beb26cc449ca1a79834c107ef4080e1 (diff) |
TOMOYO: Rename symbols.
Use shorter name in order to make it easier to fix 80 columns limit.
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.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 36b027460ea6..9b106e9adbec 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -80,7 +80,7 @@ enum tomoyo_acl_entry_type_index { | |||
80 | TOMOYO_TYPE_PATH_ACL, | 80 | TOMOYO_TYPE_PATH_ACL, |
81 | TOMOYO_TYPE_PATH2_ACL, | 81 | TOMOYO_TYPE_PATH2_ACL, |
82 | TOMOYO_TYPE_PATH_NUMBER_ACL, | 82 | TOMOYO_TYPE_PATH_NUMBER_ACL, |
83 | TOMOYO_TYPE_PATH_NUMBER3_ACL, | 83 | TOMOYO_TYPE_MKDEV_ACL, |
84 | TOMOYO_TYPE_MOUNT_ACL, | 84 | TOMOYO_TYPE_MOUNT_ACL, |
85 | }; | 85 | }; |
86 | 86 | ||
@@ -114,10 +114,10 @@ enum tomoyo_path_acl_index { | |||
114 | 114 | ||
115 | #define TOMOYO_RW_MASK ((1 << TOMOYO_TYPE_READ) | (1 << TOMOYO_TYPE_WRITE)) | 115 | #define TOMOYO_RW_MASK ((1 << TOMOYO_TYPE_READ) | (1 << TOMOYO_TYPE_WRITE)) |
116 | 116 | ||
117 | enum tomoyo_path_number3_acl_index { | 117 | enum tomoyo_mkdev_acl_index { |
118 | TOMOYO_TYPE_MKBLOCK, | 118 | TOMOYO_TYPE_MKBLOCK, |
119 | TOMOYO_TYPE_MKCHAR, | 119 | TOMOYO_TYPE_MKCHAR, |
120 | TOMOYO_MAX_PATH_NUMBER3_OPERATION | 120 | TOMOYO_MAX_MKDEV_OPERATION |
121 | }; | 121 | }; |
122 | 122 | ||
123 | enum tomoyo_path2_acl_index { | 123 | enum tomoyo_path2_acl_index { |
@@ -342,7 +342,7 @@ struct tomoyo_number_group_member { | |||
342 | * | 342 | * |
343 | * Packing "struct tomoyo_acl_info" allows | 343 | * Packing "struct tomoyo_acl_info" allows |
344 | * "struct tomoyo_path_acl" to embed "u16" and "struct tomoyo_path2_acl" | 344 | * "struct tomoyo_path_acl" to embed "u16" and "struct tomoyo_path2_acl" |
345 | * "struct tomoyo_path_number_acl" "struct tomoyo_path_number3_acl" to embed | 345 | * "struct tomoyo_path_number_acl" "struct tomoyo_mkdev_acl" to embed |
346 | * "u8" without enlarging their structure size. | 346 | * "u8" without enlarging their structure size. |
347 | */ | 347 | */ |
348 | struct tomoyo_acl_info { | 348 | struct tomoyo_acl_info { |
@@ -439,7 +439,7 @@ struct tomoyo_path_number_acl { | |||
439 | }; | 439 | }; |
440 | 440 | ||
441 | /* | 441 | /* |
442 | * tomoyo_path_number3_acl is a structure which is used for holding an | 442 | * tomoyo_mkdev_acl is a structure which is used for holding an |
443 | * entry with one pathname and three numbers operation. | 443 | * entry with one pathname and three numbers operation. |
444 | * It has following fields. | 444 | * It has following fields. |
445 | * | 445 | * |
@@ -452,8 +452,8 @@ struct tomoyo_path_number_acl { | |||
452 | * Directives held by this structure are "allow_mkchar", "allow_mkblock". | 452 | * Directives held by this structure are "allow_mkchar", "allow_mkblock". |
453 | * | 453 | * |
454 | */ | 454 | */ |
455 | struct tomoyo_path_number3_acl { | 455 | struct tomoyo_mkdev_acl { |
456 | struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_PATH_NUMBER3_ACL */ | 456 | struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_MKDEV_ACL */ |
457 | u8 perm; | 457 | u8 perm; |
458 | struct tomoyo_name_union name; | 458 | struct tomoyo_name_union name; |
459 | struct tomoyo_number_union mode; | 459 | struct tomoyo_number_union mode; |
@@ -756,12 +756,12 @@ int tomoyo_get_mode(const u8 profile, const u8 index); | |||
756 | bool tomoyo_io_printf(struct tomoyo_io_buffer *head, const char *fmt, ...) | 756 | bool tomoyo_io_printf(struct tomoyo_io_buffer *head, const char *fmt, ...) |
757 | __attribute__ ((format(printf, 2, 3))); | 757 | __attribute__ ((format(printf, 2, 3))); |
758 | /* Check whether the domainname is correct. */ | 758 | /* Check whether the domainname is correct. */ |
759 | bool tomoyo_is_correct_domain(const unsigned char *domainname); | 759 | bool tomoyo_correct_domain(const unsigned char *domainname); |
760 | /* Check whether the token is correct. */ | 760 | /* Check whether the token is correct. */ |
761 | bool tomoyo_is_correct_path(const char *filename); | 761 | bool tomoyo_correct_path(const char *filename); |
762 | bool tomoyo_is_correct_word(const char *string); | 762 | bool tomoyo_correct_word(const char *string); |
763 | /* Check whether the token can be a domainname. */ | 763 | /* Check whether the token can be a domainname. */ |
764 | bool tomoyo_is_domain_def(const unsigned char *buffer); | 764 | bool tomoyo_domain_def(const unsigned char *buffer); |
765 | bool tomoyo_parse_name_union(const char *filename, | 765 | bool tomoyo_parse_name_union(const char *filename, |
766 | struct tomoyo_name_union *ptr); | 766 | struct tomoyo_name_union *ptr); |
767 | /* Check whether the given filename matches the given path_group. */ | 767 | /* Check whether the given filename matches the given path_group. */ |
@@ -807,7 +807,7 @@ bool tomoyo_verbose_mode(const struct tomoyo_domain_info *domain); | |||
807 | /* Convert double path operation to operation name. */ | 807 | /* Convert double path operation to operation name. */ |
808 | const char *tomoyo_path22keyword(const u8 operation); | 808 | const char *tomoyo_path22keyword(const u8 operation); |
809 | const char *tomoyo_path_number2keyword(const u8 operation); | 809 | const char *tomoyo_path_number2keyword(const u8 operation); |
810 | const char *tomoyo_path_number32keyword(const u8 operation); | 810 | const char *tomoyo_mkdev2keyword(const u8 operation); |
811 | /* Get the last component of the given domainname. */ | 811 | /* Get the last component of the given domainname. */ |
812 | const char *tomoyo_get_last_name(const struct tomoyo_domain_info *domain); | 812 | const char *tomoyo_get_last_name(const struct tomoyo_domain_info *domain); |
813 | /* Convert single path operation to operation name. */ | 813 | /* Convert single path operation to operation name. */ |
@@ -919,8 +919,8 @@ int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, | |||
919 | struct path *path, const int flag); | 919 | struct path *path, const int flag); |
920 | int tomoyo_path_number_perm(const u8 operation, struct path *path, | 920 | int tomoyo_path_number_perm(const u8 operation, struct path *path, |
921 | unsigned long number); | 921 | unsigned long number); |
922 | int tomoyo_path_number3_perm(const u8 operation, struct path *path, | 922 | int tomoyo_mkdev_perm(const u8 operation, struct path *path, |
923 | const unsigned int mode, unsigned int dev); | 923 | const unsigned int mode, unsigned int dev); |
924 | int tomoyo_path_perm(const u8 operation, struct path *path); | 924 | int tomoyo_path_perm(const u8 operation, struct path *path); |
925 | int tomoyo_path2_perm(const u8 operation, struct path *path1, | 925 | int tomoyo_path2_perm(const u8 operation, struct path *path1, |
926 | struct path *path2); | 926 | struct path *path2); |
@@ -1008,25 +1008,25 @@ static inline bool tomoyo_pathcmp(const struct tomoyo_path_info *a, | |||
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | /** | 1010 | /** |
1011 | * tomoyo_is_valid - Check whether the character is a valid char. | 1011 | * tomoyo_valid - Check whether the character is a valid char. |
1012 | * | 1012 | * |
1013 | * @c: The character to check. | 1013 | * @c: The character to check. |
1014 | * | 1014 | * |
1015 | * Returns true if @c is a valid character, false otherwise. | 1015 | * Returns true if @c is a valid character, false otherwise. |
1016 | */ | 1016 | */ |
1017 | static inline bool tomoyo_is_valid(const unsigned char c) | 1017 | static inline bool tomoyo_valid(const unsigned char c) |
1018 | { | 1018 | { |
1019 | return c > ' ' && c < 127; | 1019 | return c > ' ' && c < 127; |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | /** | 1022 | /** |
1023 | * tomoyo_is_invalid - Check whether the character is an invalid char. | 1023 | * tomoyo_invalid - Check whether the character is an invalid char. |
1024 | * | 1024 | * |
1025 | * @c: The character to check. | 1025 | * @c: The character to check. |
1026 | * | 1026 | * |
1027 | * Returns true if @c is an invalid character, false otherwise. | 1027 | * Returns true if @c is an invalid character, false otherwise. |
1028 | */ | 1028 | */ |
1029 | static inline bool tomoyo_is_invalid(const unsigned char c) | 1029 | static inline bool tomoyo_invalid(const unsigned char c) |
1030 | { | 1030 | { |
1031 | return c && (c <= ' ' || c >= 127); | 1031 | return c && (c <= ' ' || c >= 127); |
1032 | } | 1032 | } |
@@ -1063,20 +1063,20 @@ static inline struct tomoyo_domain_info *tomoyo_real_domain(struct task_struct | |||
1063 | return task_cred_xxx(task, security); | 1063 | return task_cred_xxx(task, security); |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | static inline bool tomoyo_is_same_acl_head(const struct tomoyo_acl_info *p1, | 1066 | static inline bool tomoyo_same_acl_head(const struct tomoyo_acl_info *p1, |
1067 | const struct tomoyo_acl_info *p2) | 1067 | const struct tomoyo_acl_info *p2) |
1068 | { | 1068 | { |
1069 | return p1->type == p2->type; | 1069 | return p1->type == p2->type; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | static inline bool tomoyo_is_same_name_union | 1072 | static inline bool tomoyo_same_name_union |
1073 | (const struct tomoyo_name_union *p1, const struct tomoyo_name_union *p2) | 1073 | (const struct tomoyo_name_union *p1, const struct tomoyo_name_union *p2) |
1074 | { | 1074 | { |
1075 | return p1->filename == p2->filename && p1->group == p2->group && | 1075 | return p1->filename == p2->filename && p1->group == p2->group && |
1076 | p1->is_group == p2->is_group; | 1076 | p1->is_group == p2->is_group; |
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | static inline bool tomoyo_is_same_number_union | 1079 | static inline bool tomoyo_same_number_union |
1080 | (const struct tomoyo_number_union *p1, const struct tomoyo_number_union *p2) | 1080 | (const struct tomoyo_number_union *p1, const struct tomoyo_number_union *p2) |
1081 | { | 1081 | { |
1082 | return p1->values[0] == p2->values[0] && p1->values[1] == p2->values[1] | 1082 | return p1->values[0] == p2->values[0] && p1->values[1] == p2->values[1] |