diff options
Diffstat (limited to 'security/smack/smackfs.c')
-rw-r--r-- | security/smack/smackfs.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 99929a50093a..76a5dca46404 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -2063,6 +2063,19 @@ static const struct file_operations smk_revoke_subj_ops = { | |||
2063 | .llseek = generic_file_llseek, | 2063 | .llseek = generic_file_llseek, |
2064 | }; | 2064 | }; |
2065 | 2065 | ||
2066 | static struct kset *smackfs_kset; | ||
2067 | /** | ||
2068 | * smk_init_sysfs - initialize /sys/fs/smackfs | ||
2069 | * | ||
2070 | */ | ||
2071 | static int smk_init_sysfs(void) | ||
2072 | { | ||
2073 | smackfs_kset = kset_create_and_add("smackfs", NULL, fs_kobj); | ||
2074 | if (!smackfs_kset) | ||
2075 | return -ENOMEM; | ||
2076 | return 0; | ||
2077 | } | ||
2078 | |||
2066 | /** | 2079 | /** |
2067 | * smk_fill_super - fill the /smackfs superblock | 2080 | * smk_fill_super - fill the /smackfs superblock |
2068 | * @sb: the empty superblock | 2081 | * @sb: the empty superblock |
@@ -2183,6 +2196,10 @@ static int __init init_smk_fs(void) | |||
2183 | if (!security_module_enable(&smack_ops)) | 2196 | if (!security_module_enable(&smack_ops)) |
2184 | return 0; | 2197 | return 0; |
2185 | 2198 | ||
2199 | err = smk_init_sysfs(); | ||
2200 | if (err) | ||
2201 | printk(KERN_ERR "smackfs: sysfs mountpoint problem.\n"); | ||
2202 | |||
2186 | err = register_filesystem(&smk_fs_type); | 2203 | err = register_filesystem(&smk_fs_type); |
2187 | if (!err) { | 2204 | if (!err) { |
2188 | smackfs_mount = kern_mount(&smk_fs_type); | 2205 | smackfs_mount = kern_mount(&smk_fs_type); |