From: Tetsuo Handa Date: Wed, 16 Jun 2010 07:20:24 +0000 (+0900) Subject: TOMOYO: Use common code for open and mkdir etc. X-Git-Tag: v2.6.36-rc1~584^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05336dee9f5a23c042e5938b42f996dd35e31ee6;p=pandora-kernel.git TOMOYO: Use common code for open and mkdir etc. tomoyo_file_perm() and tomoyo_path_permission() are similar. We can embed tomoyo_file_perm() into tomoyo_path_permission(). Signed-off-by: Tetsuo Handa Signed-off-by: James Morris --- diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index c8ab7553c48c..203454025410 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h @@ -880,7 +880,7 @@ int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head); /* Initialize mm related code. */ void __init tomoyo_mm_init(void); -int tomoyo_check_exec_perm(struct tomoyo_request_info *r, +int tomoyo_path_permission(struct tomoyo_request_info *r, u8 operation, const struct tomoyo_path_info *filename); int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, struct path *path, const int flag); diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index fe621af46c2e..35317e783f34 100644 --- a/security/tomoyo/domain.c +++ b/security/tomoyo/domain.c @@ -960,7 +960,7 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm) } /* Check execute permission. */ - retval = tomoyo_check_exec_perm(&r, &rn); + retval = tomoyo_path_permission(&r, TOMOYO_TYPE_EXECUTE, &rn); if (retval == TOMOYO_RETRY_REQUEST) goto retry; if (retval < 0) Reading git-diff-tree failed