projects/linux·commit a7c2a10d

Merge branch 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

a7c2a10d · Linus Torvalds <[email protected]> · 2008-08-01 10:55:57 -07:00

* 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: /proc/mounts should show what it can
Commit
a7c2a10dab4e5122cbcfa3d5e9d589a52ccc2287
Parents
b14f7fb5 · 383795c2

Merge commit. Changes below are compared with the first parent: b14f7fb5.

Changes

1 files changed · +5 −1

FileStatusAddDelContent
security/selinux/hooks.cmodified+5−1View file

security/selinux/hooks.c

View file
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 40d06c5..3ae9bec 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -998,8 +998,12 @@ static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
int rc;
rc = selinux_get_mnt_opts(sb, &opts);
- if (rc)
+ if (rc) {
+ /* before policy load we may get EINVAL, don't show anything */
+ if (rc == -EINVAL)
+ rc = 0;
return rc;
+ }
selinux_write_opts(m, &opts);