Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344837
b: refs/heads/master
c: e930723
h: refs/heads/master
i:
  344835: 92ba23b
v: v3
  • Loading branch information
Casey Schaufler committed Dec 14, 2012
1 parent 85ed500 commit 8756fc6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 111fe8bd65e473d5fc6a0478cf1e2c8c6a77489a
refs/heads/master: e93072374112db9dc86635934ee761249be28370
17 changes: 17 additions & 0 deletions trunk/security/smack/smackfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,19 @@ static const struct file_operations smk_revoke_subj_ops = {
.llseek = generic_file_llseek,
};

static struct kset *smackfs_kset;
/**
* smk_init_sysfs - initialize /sys/fs/smackfs
*
*/
static int smk_init_sysfs(void)
{
smackfs_kset = kset_create_and_add("smackfs", NULL, fs_kobj);
if (!smackfs_kset)
return -ENOMEM;
return 0;
}

/**
* smk_fill_super - fill the /smackfs superblock
* @sb: the empty superblock
Expand Down Expand Up @@ -2183,6 +2196,10 @@ static int __init init_smk_fs(void)
if (!security_module_enable(&smack_ops))
return 0;

err = smk_init_sysfs();
if (err)
printk(KERN_ERR "smackfs: sysfs mountpoint problem.\n");

err = register_filesystem(&smk_fs_type);
if (!err) {
smackfs_mount = kern_mount(&smk_fs_type);
Expand Down

0 comments on commit 8756fc6

Please sign in to comment.