diff options
author | Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> | 2009-06-19 01:13:27 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-06-19 04:48:18 -0400 |
commit | 56f8c9bc410deb55f21698e6a0d59f559ae1d794 (patch) | |
tree | 57536190ade898da7449eb8c369c32c80019cef5 /security/tomoyo/domain.c | |
parent | ccf135f509abdbf607e9a68f08ddeee2c66dc36e (diff) |
TOMOYO: Remove next_domain from tomoyo_find_next_domain().
We can update bprm->cred->security inside tomoyo_find_next_domain().
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/domain.c')
-rw-r--r-- | security/tomoyo/domain.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index e68b1052354b..fcf52accce2b 100644 --- a/security/tomoyo/domain.c +++ b/security/tomoyo/domain.c | |||
@@ -786,13 +786,11 @@ struct tomoyo_domain_info *tomoyo_find_or_assign_new_domain(const char * | |||
786 | /** | 786 | /** |
787 | * tomoyo_find_next_domain - Find a domain. | 787 | * tomoyo_find_next_domain - Find a domain. |
788 | * | 788 | * |
789 | * @bprm: Pointer to "struct linux_binprm". | 789 | * @bprm: Pointer to "struct linux_binprm". |
790 | * @next_domain: Pointer to pointer to "struct tomoyo_domain_info". | ||
791 | * | 790 | * |
792 | * Returns 0 on success, negative value otherwise. | 791 | * Returns 0 on success, negative value otherwise. |
793 | */ | 792 | */ |
794 | int tomoyo_find_next_domain(struct linux_binprm *bprm, | 793 | int tomoyo_find_next_domain(struct linux_binprm *bprm) |
795 | struct tomoyo_domain_info **next_domain) | ||
796 | { | 794 | { |
797 | /* | 795 | /* |
798 | * This function assumes that the size of buffer returned by | 796 | * This function assumes that the size of buffer returned by |
@@ -914,9 +912,11 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm, | |||
914 | tomoyo_set_domain_flag(old_domain, false, | 912 | tomoyo_set_domain_flag(old_domain, false, |
915 | TOMOYO_DOMAIN_FLAGS_TRANSITION_FAILED); | 913 | TOMOYO_DOMAIN_FLAGS_TRANSITION_FAILED); |
916 | out: | 914 | out: |
915 | if (!domain) | ||
916 | domain = old_domain; | ||
917 | bprm->cred->security = domain; | ||
917 | tomoyo_free(real_program_name); | 918 | tomoyo_free(real_program_name); |
918 | tomoyo_free(symlink_program_name); | 919 | tomoyo_free(symlink_program_name); |
919 | *next_domain = domain ? domain : old_domain; | ||
920 | tomoyo_free(tmp); | 920 | tomoyo_free(tmp); |
921 | return retval; | 921 | return retval; |
922 | } | 922 | } |