Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22511
b: refs/heads/master
c: 161ce45
h: refs/heads/master
i:
  22509: 5a0b9dc
  22507: d4cc6fd
  22503: 25f6ce2
  22495: b4b9df5
v: v3
  • Loading branch information
James Morris authored and Linus Torvalds committed Mar 22, 2006
1 parent ae0a16f commit 53b384a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 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: cde174a885821b5eee7e00c8a9a426c9c8186a29
refs/heads/master: 161ce45a8a34ba81673f60c603e6fc6d37d99c8f
41 changes: 24 additions & 17 deletions trunk/security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,28 +1213,34 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent)
};
ret = simple_fill_super(sb, SELINUX_MAGIC, selinux_files);
if (ret)
return ret;
goto err;

dentry = d_alloc_name(sb->s_root, BOOL_DIR_NAME);
if (!dentry)
return -ENOMEM;
if (!dentry) {
ret = -ENOMEM;
goto err;
}

ret = sel_make_dir(sb, dentry);
if (ret)
return ret;
goto err;

bool_dir = dentry;
ret = sel_make_bools();
if (ret)
goto out;
goto err;

dentry = d_alloc_name(sb->s_root, NULL_FILE_NAME);
if (!dentry)
return -ENOMEM;
if (!dentry) {
ret = -ENOMEM;
goto err;
}

inode = sel_make_inode(sb, S_IFCHR | S_IRUGO | S_IWUGO);
if (!inode)
goto out;
if (!inode) {
ret = -ENOMEM;
goto err;
}
isec = (struct inode_security_struct*)inode->i_security;
isec->sid = SECINITSID_DEVNULL;
isec->sclass = SECCLASS_CHR_FILE;
Expand All @@ -1245,22 +1251,23 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent)
selinux_null = dentry;

dentry = d_alloc_name(sb->s_root, "avc");
if (!dentry)
return -ENOMEM;
if (!dentry) {
ret = -ENOMEM;
goto err;
}

ret = sel_make_dir(sb, dentry);
if (ret)
goto out;
goto err;

ret = sel_make_avc_files(dentry);
if (ret)
goto out;

return 0;
goto err;
out:
dput(dentry);
return ret;
err:
printk(KERN_ERR "%s: failed while creating inodes\n", __FUNCTION__);
return -ENOMEM;
goto out;
}

static struct super_block *sel_get_sb(struct file_system_type *fs_type,
Expand Down

0 comments on commit 53b384a

Please sign in to comment.