aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/gc.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-20 22:14:39 -0400
committerJames Morris <jmorris@namei.org>2010-08-02 01:34:43 -0400
commit5448ec4f5062ef75ce74f8d7784d4cea9c46ad00 (patch)
treec4c742b928c799e03328e345e1d4af738f315afb /security/tomoyo/gc.c
parent0617c7ff34dc9b1d641640c3953274bb2dbe21a6 (diff)
TOMOYO: Use common code for domain transition control.
Use common code for "initialize_domain"/"no_initialize_domain"/"keep_domain"/ "no_keep_domain" keywords. 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/gc.c')
-rw-r--r--security/tomoyo/gc.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index 4d4ba84f8749..254ac1145552 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -53,17 +53,9 @@ static void tomoyo_del_no_rewrite(struct list_head *element)
53 tomoyo_put_name(ptr->pattern); 53 tomoyo_put_name(ptr->pattern);
54} 54}
55 55
56static void tomoyo_del_domain_initializer(struct list_head *element) 56static void tomoyo_del_transition_control(struct list_head *element)
57{ 57{
58 struct tomoyo_domain_initializer_entry *ptr = 58 struct tomoyo_transition_control *ptr =
59 container_of(element, typeof(*ptr), head.list);
60 tomoyo_put_name(ptr->domainname);
61 tomoyo_put_name(ptr->program);
62}
63
64static void tomoyo_del_domain_keeper(struct list_head *element)
65{
66 struct tomoyo_domain_keeper_entry *ptr =
67 container_of(element, typeof(*ptr), head.list); 59 container_of(element, typeof(*ptr), head.list);
68 tomoyo_put_name(ptr->domainname); 60 tomoyo_put_name(ptr->domainname);
69 tomoyo_put_name(ptr->program); 61 tomoyo_put_name(ptr->program);
@@ -292,11 +284,8 @@ static void tomoyo_kfree_entry(void)
292 list_for_each_entry_safe(p, tmp, &tomoyo_gc_queue, list) { 284 list_for_each_entry_safe(p, tmp, &tomoyo_gc_queue, list) {
293 struct list_head *element = p->element; 285 struct list_head *element = p->element;
294 switch (p->type) { 286 switch (p->type) {
295 case TOMOYO_ID_DOMAIN_INITIALIZER: 287 case TOMOYO_ID_TRANSITION_CONTROL:
296 tomoyo_del_domain_initializer(element); 288 tomoyo_del_transition_control(element);
297 break;
298 case TOMOYO_ID_DOMAIN_KEEPER:
299 tomoyo_del_domain_keeper(element);
300 break; 289 break;
301 case TOMOYO_ID_AGGREGATOR: 290 case TOMOYO_ID_AGGREGATOR:
302 tomoyo_del_aggregator(element); 291 tomoyo_del_aggregator(element);