From: Eric Paris <eparis@redhat.com>
To: Marc Dionne <marc.c.dionne@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
jmorris@namei.org, sds@tycho.nsa.gov
Subject: Re: /proc/mounts unreadable - bisected
Date: Wed, 16 Jul 2008 20:59:31 -0400 [thread overview]
Message-ID: <1216256371.3070.66.camel@localhost.localdomain> (raw)
In-Reply-To: <487E9815.6060803@gmail.com>
On Wed, 2008-07-16 at 20:53 -0400, Marc Dionne wrote:
> With current git, /proc/mounts is unreadable on my system, with any attempts to
> read it returning EINVAL. This breaks many init scripts, among other things.
>
> I bisected it down to this commit:
>
> commit 2069f457848f846cb31149c9aa29b330a6b66d1b
> Author: Eric Paris <eparis@redhat.com>
> Date: Fri Jul 4 09:47:13 2008 +1000
>
> LSM/SELinux: show LSM mount options in /proc/mounts
>
> This patch causes SELinux mount options to show up in /proc/mounts. As
> with other code in the area seq_put errors are ignored. Other LSM's
> will not have their mount options displayed until they fill in their own
> security_sb_show_options() function.
>
> In my case, selinux_get_mnt_opts() never gets very far because
> sbsec->initialized never becomes true, and the function systematically returns
> EINVAL which is then passed back up to the reader of /proc/mounts.
>
> Changing show_sb_opts() to always return 0 (it was a void function before this
> commit) makes the system behave normally.
>
> Now it's possible that my selinux config is hosed - I have it enabled in
> permissive mode but I don't pay much attention to it - but the failure mode in
> that case should probably be more graceful. Seems like it would be better to
> print out the available mount info minus the LSM options than to bail out
> completely?
Yes, your SELinux config is hosed. But I'll agree that we should just
pass over the LSM options in that case (since clearly there aren't any)
and not fail the read altogether. Patch will be forthcoming.
-Eric
prev parent reply other threads:[~2008-07-17 0:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 0:53 /proc/mounts unreadable - bisected Marc Dionne
2008-07-17 0:59 ` Eric Paris [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1216256371.3070.66.camel@localhost.localdomain \
--to=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.c.dionne@gmail.com \
--cc=sds@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.