Skip to content

Commit

Permalink
SELinux: correctly detect proc filesystems of the form "proc/foo"
Browse files Browse the repository at this point in the history
Map all of these proc/ filesystem types to "proc" for the policy lookup at
filesystem mount time.

Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Stephen Smalley authored and James Morris committed Dec 19, 2008
1 parent 1e64174 commit 459c19f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 459c19f

Please sign in to comment.