Gitweb: http://git.kernel.org/linus/e5a3b95f581da62e2054ef79d3be2d383e9ed664 Commit: e5a3b95f581da62e2054ef79d3be2d383e9ed664 Parent: 33043cbb9fd49a957089f5948fe814764d7abbd6 Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> AuthorDate: Sat Feb 14 11:46:56 2009 +0900 Committer: James Morris <jmorris@namei.org> CommitDate: Mon Feb 16 09:01:48 2009 +1100 TOMOYO: Don't create securityfs entries unless registered. TOMOYO should not create /sys/kernel/security/tomoyo/ interface unless TOMOYO is registered. Signed-off-by: Kentaro Takeda <takedakn@nttdata.co.jp> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Toshiharu Harada <haradats@nttdata.co.jp> Signed-off-by: James Morris <jmorris@namei.org> --- security/tomoyo/common.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index 8bedfb1..92cea65 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c @@ -2177,6 +2177,10 @@ static int __init tomoyo_initerface_init(void) { struct dentry *tomoyo_dir; + /* Don't create securityfs entries unless registered. */ + if (current_cred()->security != &tomoyo_kernel_domain) + return 0; + tomoyo_dir = securityfs_create_dir("tomoyo", NULL); tomoyo_create_entry("domain_policy", 0600, tomoyo_dir, TOMOYO_DOMAINPOLICY); -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
