1111LIST_HEAD (tomoyo_number_group_list );
1212
1313/**
14- * tomoyo_get_number_group - Allocate memory for "struct tomoyo_number_group".
14+ * tomoyo_get_group - Allocate memory for "struct tomoyo_number_group".
1515 *
1616 * @group_name: The name of number group.
1717 *
1818 * Returns pointer to "struct tomoyo_number_group" on success,
1919 * NULL otherwise.
2020 */
21- struct tomoyo_number_group * tomoyo_get_number_group (const char * group_name )
21+ struct tomoyo_group * tomoyo_get_number_group (const char * group_name )
2222{
23- struct tomoyo_number_group * entry = NULL ;
24- struct tomoyo_number_group * group = NULL ;
23+ struct tomoyo_group * entry = NULL ;
24+ struct tomoyo_group * group = NULL ;
2525 const struct tomoyo_path_info * saved_group_name ;
2626 int error = - ENOMEM ;
2727 if (!tomoyo_correct_word (group_name ))
@@ -59,12 +59,12 @@ struct tomoyo_number_group *tomoyo_get_number_group(const char *group_name)
5959static bool tomoyo_same_number_group (const struct tomoyo_acl_head * a ,
6060 const struct tomoyo_acl_head * b )
6161{
62- return !memcmp (& container_of (a , struct tomoyo_number_group_member ,
62+ return !memcmp (& container_of (a , struct tomoyo_number_group ,
6363 head )-> number ,
64- & container_of (b , struct tomoyo_number_group_member ,
64+ & container_of (b , struct tomoyo_number_group ,
6565 head )-> number ,
6666 sizeof (container_of (a ,
67- struct tomoyo_number_group_member ,
67+ struct tomoyo_number_group ,
6868 head )-> number ));
6969}
7070
@@ -78,8 +78,8 @@ static bool tomoyo_same_number_group(const struct tomoyo_acl_head *a,
7878 */
7979int tomoyo_write_number_group_policy (char * data , const bool is_delete )
8080{
81- struct tomoyo_number_group * group ;
82- struct tomoyo_number_group_member e = { };
81+ struct tomoyo_group * group ;
82+ struct tomoyo_number_group e = { };
8383 int error ;
8484 char * w [2 ];
8585 if (!tomoyo_tokenize (data , w , sizeof (w )))
@@ -93,7 +93,7 @@ int tomoyo_write_number_group_policy(char *data, const bool is_delete)
9393 error = tomoyo_update_policy (& e .head , sizeof (e ), is_delete ,
9494 & group -> member_list ,
9595 tomoyo_same_number_group );
96- tomoyo_put_number_group (group );
96+ tomoyo_put_group (group );
9797 return error ;
9898}
9999
@@ -111,16 +111,16 @@ bool tomoyo_read_number_group_policy(struct tomoyo_io_buffer *head)
111111 struct list_head * gpos ;
112112 struct list_head * mpos ;
113113 list_for_each_cookie (gpos , head -> read_var1 , & tomoyo_number_group_list ) {
114- struct tomoyo_number_group * group ;
114+ struct tomoyo_group * group ;
115115 const char * name ;
116- group = list_entry (gpos , struct tomoyo_number_group , list );
116+ group = list_entry (gpos , struct tomoyo_group , list );
117117 name = group -> group_name -> name ;
118118 list_for_each_cookie (mpos , head -> read_var2 ,
119119 & group -> member_list ) {
120120 int pos ;
121- const struct tomoyo_number_group_member * member
121+ const struct tomoyo_number_group * member
122122 = list_entry (mpos ,
123- struct tomoyo_number_group_member ,
123+ struct tomoyo_number_group ,
124124 head .list );
125125 if (member -> head .is_deleted )
126126 continue ;
@@ -150,9 +150,9 @@ bool tomoyo_read_number_group_policy(struct tomoyo_io_buffer *head)
150150 */
151151bool tomoyo_number_matches_group (const unsigned long min ,
152152 const unsigned long max ,
153- const struct tomoyo_number_group * group )
153+ const struct tomoyo_group * group )
154154{
155- struct tomoyo_number_group_member * member ;
155+ struct tomoyo_number_group * member ;
156156 bool matched = false;
157157 list_for_each_entry_rcu (member , & group -> member_list , head .list ) {
158158 if (member -> head .is_deleted )
0 commit comments