summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/kernel-mfld-blackbay.changes3
-rw-r--r--security/smack/smackfs.c18
2 files changed, 21 insertions, 0 deletions
diff --git a/packaging/kernel-mfld-blackbay.changes b/packaging/kernel-mfld-blackbay.changes
index 3c2bccdb97d..1f35c9a6ab6 100644
--- a/packaging/kernel-mfld-blackbay.changes
+++ b/packaging/kernel-mfld-blackbay.changes
@@ -1,3 +1,6 @@
+* Thu Jul 25 2013 Brad Peters <brad.t.peters@intel.com>
+- Added a Smack sysfs mount, ported from upstream
+
* Fri May 10 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> submit/tizen_2.1/20130424.070713@6d4e74e
[ Jie Yang ]
- Enable long press to answer incoming call, fix TZSP-5507.
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 99929a50093..e8d3e7874f0 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -2063,6 +2063,20 @@ 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
@@ -2183,6 +2197,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);