@@ -310,10 +310,10 @@ struct tomoyo_path_info {
310310};
311311
312312/*
313- * tomoyo_name_entry is a structure which is used for linking
313+ * tomoyo_name is a structure which is used for linking
314314 * "struct tomoyo_path_info" into tomoyo_name_list .
315315 */
316- struct tomoyo_name_entry {
316+ struct tomoyo_name {
317317 struct list_head list ;
318318 atomic_t users ;
319319 struct tomoyo_path_info entry ;
@@ -572,42 +572,42 @@ struct tomoyo_io_buffer {
572572};
573573
574574/*
575- * tomoyo_globally_readable_file_entry is a structure which is used for holding
575+ * tomoyo_readable_file is a structure which is used for holding
576576 * "allow_read" entries.
577577 * It has following fields.
578578 *
579579 * (1) "head" is "struct tomoyo_acl_head".
580580 * (2) "filename" is a pathname which is allowed to open(O_RDONLY).
581581 */
582- struct tomoyo_globally_readable_file_entry {
582+ struct tomoyo_readable_file {
583583 struct tomoyo_acl_head head ;
584584 const struct tomoyo_path_info * filename ;
585585};
586586
587587/*
588- * tomoyo_pattern_entry is a structure which is used for holding
588+ * tomoyo_no_pattern is a structure which is used for holding
589589 * "file_pattern" entries.
590590 * It has following fields.
591591 *
592592 * (1) "head" is "struct tomoyo_acl_head".
593593 * (2) "pattern" is a pathname pattern which is used for converting pathnames
594594 * to pathname patterns during learning mode.
595595 */
596- struct tomoyo_pattern_entry {
596+ struct tomoyo_no_pattern {
597597 struct tomoyo_acl_head head ;
598598 const struct tomoyo_path_info * pattern ;
599599};
600600
601601/*
602- * tomoyo_no_rewrite_entry is a structure which is used for holding
602+ * tomoyo_no_rewrite is a structure which is used for holding
603603 * "deny_rewrite" entries.
604604 * It has following fields.
605605 *
606606 * (1) "head" is "struct tomoyo_acl_head".
607607 * (2) "pattern" is a pathname which is by default not permitted to modify
608608 * already existing content.
609609 */
610- struct tomoyo_no_rewrite_entry {
610+ struct tomoyo_no_rewrite {
611611 struct tomoyo_acl_head head ;
612612 const struct tomoyo_path_info * pattern ;
613613};
@@ -636,22 +636,22 @@ struct tomoyo_transition_control {
636636};
637637
638638/*
639- * tomoyo_aggregator_entry is a structure which is used for holding
639+ * tomoyo_aggregator is a structure which is used for holding
640640 * "aggregator" entries.
641641 * It has following fields.
642642 *
643643 * (1) "head" is "struct tomoyo_acl_head".
644644 * (2) "original_name" which is originally requested name.
645645 * (3) "aggregated_name" which is name to rewrite.
646646 */
647- struct tomoyo_aggregator_entry {
647+ struct tomoyo_aggregator {
648648 struct tomoyo_acl_head head ;
649649 const struct tomoyo_path_info * original_name ;
650650 const struct tomoyo_path_info * aggregated_name ;
651651};
652652
653653/*
654- * tomoyo_policy_manager_entry is a structure which is used for holding list of
654+ * tomoyo_manager is a structure which is used for holding list of
655655 * domainnames or programs which are permitted to modify configuration via
656656 * /sys/kernel/security/tomoyo/ interface.
657657 * It has following fields.
@@ -661,7 +661,7 @@ struct tomoyo_aggregator_entry {
661661 * otherwise.
662662 * (3) "manager" is a domainname or a program's pathname.
663663 */
664- struct tomoyo_policy_manager_entry {
664+ struct tomoyo_manager {
665665 struct tomoyo_acl_head head ;
666666 bool is_domain ; /* True if manager is a domainname. */
667667 /* A path to program or a domainname. */
@@ -749,8 +749,6 @@ bool tomoyo_parse_number_union(char *data, struct tomoyo_number_union *num);
749749bool tomoyo_tokenize (char * buffer , char * w [], size_t size );
750750/* Write domain policy violation warning message to console? */
751751bool tomoyo_verbose_mode (const struct tomoyo_domain_info * domain );
752- /* Get the last component of the given domainname. */
753- const char * tomoyo_get_last_name (const struct tomoyo_domain_info * domain );
754752/* Fill "struct tomoyo_request_info". */
755753int tomoyo_init_request_info (struct tomoyo_request_info * r ,
756754 struct tomoyo_domain_info * domain ,
@@ -759,7 +757,7 @@ int tomoyo_init_request_info(struct tomoyo_request_info *r,
759757int tomoyo_mount_permission (char * dev_name , struct path * path , char * type ,
760758 unsigned long flags , void * data_page );
761759/* Create "aggregator" entry in exception policy. */
762- int tomoyo_write_aggregator_policy (char * data , const bool is_delete );
760+ int tomoyo_write_aggregator (char * data , const bool is_delete );
763761int tomoyo_write_transition_control (char * data , const bool is_delete ,
764762 const u8 type );
765763/*
@@ -769,27 +767,26 @@ int tomoyo_write_transition_control(char *data, const bool is_delete,
769767 * "allow_truncate", "allow_symlink", "allow_rewrite", "allow_rename" and
770768 * "allow_link" entry in domain policy.
771769 */
772- int tomoyo_write_file_policy (char * data , struct tomoyo_domain_info * domain ,
773- const bool is_delete );
770+ int tomoyo_write_file (char * data , struct tomoyo_domain_info * domain ,
771+ const bool is_delete );
774772/* Create "allow_read" entry in exception policy. */
775- int tomoyo_write_globally_readable_policy (char * data , const bool is_delete );
773+ int tomoyo_write_globally_readable (char * data , const bool is_delete );
776774/* Create "allow_mount" entry in domain policy. */
777- int tomoyo_write_mount_policy (char * data , struct tomoyo_domain_info * domain ,
778- const bool is_delete );
775+ int tomoyo_write_mount (char * data , struct tomoyo_domain_info * domain ,
776+ const bool is_delete );
779777/* Create "deny_rewrite" entry in exception policy. */
780- int tomoyo_write_no_rewrite_policy (char * data , const bool is_delete );
778+ int tomoyo_write_no_rewrite (char * data , const bool is_delete );
781779/* Create "file_pattern" entry in exception policy. */
782- int tomoyo_write_pattern_policy (char * data , const bool is_delete );
780+ int tomoyo_write_pattern (char * data , const bool is_delete );
783781/* Create "path_group"/"number_group" entry in exception policy. */
784782int tomoyo_write_group (char * data , const bool is_delete , const u8 type );
785783int tomoyo_supervisor (struct tomoyo_request_info * r , const char * fmt , ...)
786784 __attribute__ ((format (printf , 2 , 3 )));
787785/* Find a domain by the given name. */
788786struct tomoyo_domain_info * tomoyo_find_domain (const char * domainname );
789787/* Find or create a domain by the given name. */
790- struct tomoyo_domain_info * tomoyo_find_or_assign_new_domain (const char *
791- domainname ,
792- const u8 profile );
788+ struct tomoyo_domain_info * tomoyo_assign_domain (const char * domainname ,
789+ const u8 profile );
793790struct tomoyo_profile * tomoyo_profile (const u8 profile );
794791/*
795792 * Allocate memory for "struct tomoyo_path_group"/"struct tomoyo_number_group".
@@ -820,7 +817,7 @@ char *tomoyo_realpath_nofollow(const char *pathname);
820817 */
821818char * tomoyo_realpath_from_path (struct path * path );
822819/* Get patterned pathname. */
823- const char * tomoyo_file_pattern (const struct tomoyo_path_info * filename );
820+ const char * tomoyo_pattern (const struct tomoyo_path_info * filename );
824821
825822/* Check memory quota. */
826823bool tomoyo_memory_ok (void * ptr );
@@ -882,7 +879,6 @@ int tomoyo_update_policy(struct tomoyo_acl_head *new_entry, const int size,
882879void tomoyo_check_acl (struct tomoyo_request_info * r ,
883880 bool (* check_entry ) (const struct tomoyo_request_info * ,
884881 const struct tomoyo_acl_info * ));
885- const char * tomoyo_last_word (const char * name );
886882
887883/********** External variable definitions. **********/
888884
@@ -959,8 +955,8 @@ static inline bool tomoyo_invalid(const unsigned char c)
959955static inline void tomoyo_put_name (const struct tomoyo_path_info * name )
960956{
961957 if (name ) {
962- struct tomoyo_name_entry * ptr =
963- container_of (name , struct tomoyo_name_entry , entry );
958+ struct tomoyo_name * ptr =
959+ container_of (name , typeof ( * ptr ) , entry );
964960 atomic_dec (& ptr -> users );
965961 }
966962}
0 commit comments