diff options
-rw-r--r-- | 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 8bedfb1992e5..92cea656ad21 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -2177,6 +2177,10 @@ static int __init tomoyo_initerface_init(void) | |||
2177 | { | 2177 | { |
2178 | struct dentry *tomoyo_dir; | 2178 | struct dentry *tomoyo_dir; |
2179 | 2179 | ||
2180 | /* Don't create securityfs entries unless registered. */ | ||
2181 | if (current_cred()->security != &tomoyo_kernel_domain) | ||
2182 | return 0; | ||
2183 | |||
2180 | tomoyo_dir = securityfs_create_dir("tomoyo", NULL); | 2184 | tomoyo_dir = securityfs_create_dir("tomoyo", NULL); |
2181 | tomoyo_create_entry("domain_policy", 0600, tomoyo_dir, | 2185 | tomoyo_create_entry("domain_policy", 0600, tomoyo_dir, |
2182 | TOMOYO_DOMAINPOLICY); | 2186 | TOMOYO_DOMAINPOLICY); |