From 5be47ce69f9b4921347ab1c14f021c72e8e5697e Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Sat, 14 Feb 2009 11:46:56 +0900 Subject: [PATCH] --- yaml --- r: 132631 b: refs/heads/master c: e5a3b95f581da62e2054ef79d3be2d383e9ed664 h: refs/heads/master i: 132629: 128b5971820aecd8688797405f6ad0b81fc968a8 132627: 04837d9a23385a8b4ff4d1a836856a0c5f075034 132623: 69a25502dafdb8a1f5a37a1f3d8418131ef51fb8 v: v3 --- [refs] | 2 +- trunk/security/tomoyo/common.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e4305bbf5f09..e829d93237d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33043cbb9fd49a957089f5948fe814764d7abbd6 +refs/heads/master: e5a3b95f581da62e2054ef79d3be2d383e9ed664 diff --git a/trunk/security/tomoyo/common.c b/trunk/security/tomoyo/common.c index 8bedfb1992e5..92cea656ad21 100644 --- a/trunk/security/tomoyo/common.c +++ b/trunk/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);