Skip to content

Commit a7c2a10

Browse files
committed
Merge branch 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: SELinux: /proc/mounts should show what it can
2 parents b14f7fb + 383795c commit a7c2a10

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎security/selinux/hooks.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,12 @@ static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
998998
int rc;
999999

10001000
rc = selinux_get_mnt_opts(sb, &opts);
1001-
if (rc)
1001+
if (rc) {
1002+
/* before policy load we may get EINVAL, don't show anything */
1003+
if (rc == -EINVAL)
1004+
rc = 0;
10021005
return rc;
1006+
}
10031007

10041008
selinux_write_opts(m, &opts);
10051009

0 commit comments

Comments
 (0)