]> Pileus Git - ~andy/linux/blobdiff - security/tomoyo/gc.c
TOMOYO: Use common code for policy reading.
[~andy/linux] / security / tomoyo / gc.c
index cf62a4ee79c27e400f17818f49bf40122f433641..254ac114555221a4b317f8667a74c7ede0054926 100644 (file)
@@ -53,17 +53,9 @@ static void tomoyo_del_no_rewrite(struct list_head *element)
        tomoyo_put_name(ptr->pattern);
 }
 
-static void tomoyo_del_domain_initializer(struct list_head *element)
+static void tomoyo_del_transition_control(struct list_head *element)
 {
-       struct tomoyo_domain_initializer_entry *ptr =
-               container_of(element, typeof(*ptr), head.list);
-       tomoyo_put_name(ptr->domainname);
-       tomoyo_put_name(ptr->program);
-}
-
-static void tomoyo_del_domain_keeper(struct list_head *element)
-{
-       struct tomoyo_domain_keeper_entry *ptr =
+       struct tomoyo_transition_control *ptr =
                container_of(element, typeof(*ptr), head.list);
        tomoyo_put_name(ptr->domainname);
        tomoyo_put_name(ptr->program);
@@ -77,14 +69,6 @@ static void tomoyo_del_aggregator(struct list_head *element)
        tomoyo_put_name(ptr->aggregated_name);
 }
 
-static void tomoyo_del_alias(struct list_head *element)
-{
-       struct tomoyo_alias_entry *ptr =
-               container_of(element, typeof(*ptr), head.list);
-       tomoyo_put_name(ptr->original_name);
-       tomoyo_put_name(ptr->aliased_name);
-}
-
 static void tomoyo_del_manager(struct list_head *element)
 {
        struct tomoyo_policy_manager_entry *ptr =
@@ -300,18 +284,12 @@ static void tomoyo_kfree_entry(void)
        list_for_each_entry_safe(p, tmp, &tomoyo_gc_queue, list) {
                struct list_head *element = p->element;
                switch (p->type) {
-               case TOMOYO_ID_DOMAIN_INITIALIZER:
-                       tomoyo_del_domain_initializer(element);
-                       break;
-               case TOMOYO_ID_DOMAIN_KEEPER:
-                       tomoyo_del_domain_keeper(element);
+               case TOMOYO_ID_TRANSITION_CONTROL:
+                       tomoyo_del_transition_control(element);
                        break;
                case TOMOYO_ID_AGGREGATOR:
                        tomoyo_del_aggregator(element);
                        break;
-               case TOMOYO_ID_ALIAS:
-                       tomoyo_del_alias(element);
-                       break;
                case TOMOYO_ID_GLOBALLY_READABLE:
                        tomoyo_del_allow_read(element);
                        break;