Explorar o código

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
Linus Torvalds %!s(int64=17) %!d(string=hai) anos
pai
achega
a7c2a10dab
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      security/selinux/hooks.c

+ 5 - 1
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);