diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-06-21 11:14:39 +0900 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 15:34:43 +1000 |
commit | 5448ec4f5062ef75ce74f8d7784d4cea9c46ad00 (patch) | |
tree | c4c742b928c799e03328e345e1d4af738f315afb /security/tomoyo/gc.c | |
parent | 0617c7ff34dc9b1d641640c3953274bb2dbe21a6 (diff) | |
download | kernel_samsung_espresso10-5448ec4f5062ef75ce74f8d7784d4cea9c46ad00.zip kernel_samsung_espresso10-5448ec4f5062ef75ce74f8d7784d4cea9c46ad00.tar.gz kernel_samsung_espresso10-5448ec4f5062ef75ce74f8d7784d4cea9c46ad00.tar.bz2 |
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.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c index 4d4ba84..254ac11 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) 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); @@ -292,11 +284,8 @@ 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); |