Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250807
b: refs/heads/master
c: 7a627e3
h: refs/heads/master
i:
  250805: c1f19f3
  250803: 1ea9588
  250799: 3c47e9e
v: v3
  • Loading branch information
Greg Kroah-Hartman authored and Eric Paris committed May 11, 2011
1 parent 0979ee1 commit ceb0be4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2875fa00830be62431f5ac22d8f85d57f9fa3033
refs/heads/master: 7a627e3b9a2bd0f06945bbe64bcf403e788ecf6e
12 changes: 11 additions & 1 deletion trunk/security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/percpu.h>
#include <linux/audit.h>
#include <linux/uaccess.h>
#include <linux/kobject.h>

/* selinuxfs pseudo filesystem for exporting the security policy API.
Based on the proc code and the fs/nfsd/nfsctl.c code. */
Expand Down Expand Up @@ -1909,16 +1910,24 @@ static struct file_system_type sel_fs_type = {
};

struct vfsmount *selinuxfs_mount;
static struct kobject *selinuxfs_kobj;

static int __init init_sel_fs(void)
{
int err;

if (!selinux_enabled)
return 0;

selinuxfs_kobj = kobject_create_and_add("selinux", fs_kobj);
if (!selinuxfs_kobj)
return -ENOMEM;

err = register_filesystem(&sel_fs_type);
if (err)
if (err) {
kobject_put(selinuxfs_kobj);
return err;
}

selinuxfs_mount = kern_mount(&sel_fs_type);
if (IS_ERR(selinuxfs_mount)) {
Expand All @@ -1935,6 +1944,7 @@ __initcall(init_sel_fs);
#ifdef CONFIG_SECURITY_SELINUX_DISABLE
void exit_sel_fs(void)
{
kobject_put(selinuxfs_kobj);
unregister_filesystem(&sel_fs_type);
}
#endif

0 comments on commit ceb0be4

Please sign in to comment.