提交 459c19f5 编写于 作者: S Stephen Smalley 提交者: James Morris

SELinux: correctly detect proc filesystems of the form "proc/foo"

Map all of these proc/ filesystem types to "proc" for the policy lookup at
filesystem mount time.
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 1e641743
......@@ -702,7 +702,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
sbsec->proc = 1;
/* Determine the labeling behavior to use for this filesystem type. */
rc = security_fs_use(sb->s_type->name, &sbsec->behavior, &sbsec->sid);
rc = security_fs_use(sbsec->proc ? "proc" : sb->s_type->name, &sbsec->behavior, &sbsec->sid);
if (rc) {
printk(KERN_WARNING "%s: security_fs_use(%s) returned %d\n",
__func__, sb->s_type->name, rc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册