From: James Morris <jmorris@namei.org>
To: Eric Paris <eparis@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
sds@tycho.nsa.gov, linux-security-module@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH -v2] SELinux/LSM: display SELinux mount options in /proc/mounts
Date: Wed, 9 Apr 2008 08:36:04 +1000 (EST) [thread overview]
Message-ID: <Xine.LNX.4.64.0804090833250.25920@us.intercode.com.au> (raw)
In-Reply-To: <1207347775.2981.32.camel@localhost.localdomain>
On Fri, 4 Apr 2008, Eric Paris wrote:
> 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.
>
> Signed-off-by: Eric Paris <eparis@redhat.com>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
>
> ---
>
> This patch is against a merged vfs-2.6:vfs-2.6.25 and selinux:for-akpm
> repo. It requires the a6307a583a073f85c38399c1e2c21dfe2d6a3da0
> changeset in jame's repo to compile. I'll let you and James decide if
> we should push it through the VFS tree or the SELinux tree....
It doesn't apply to my for-akpm branch.
fs/namespace.c.rej:
***************
*** 748,754 ****
const char *str;
};
- static void show_sb_opts(struct seq_file *m, struct super_block *sb)
{
static const struct proc_fs_info fs_info[] = {
{ MS_SYNCHRONOUS, ",sync" },
--- 748,754 ----
const char *str;
};
+ static int show_sb_opts(struct seq_file *m, struct super_block *sb)
{
static const struct proc_fs_info fs_info[] = {
{ MS_SYNCHRONOUS, ",sync" },
***************
*** 786,794 ****
seq_putc(m, ' ');
show_type(m, mnt->mnt_sb);
seq_puts(m, __mnt_is_readonly(mnt) ? " ro" : " rw");
- show_sb_opts(m, mnt->mnt_sb);
show_mnt_opts(m, mnt);
- if (mnt->mnt_sb->s_op->show_options)
err = mnt->mnt_sb->s_op->show_options(m, mnt);
seq_puts(m, " 0 0\n");
return err;
--- 788,796 ----
seq_putc(m, ' ');
show_type(m, mnt->mnt_sb);
seq_puts(m, __mnt_is_readonly(mnt) ? " ro" : " rw");
+ err = show_sb_opts(m, mnt->mnt_sb);
show_mnt_opts(m, mnt);
+ if (!err && mnt->mnt_sb->s_op->show_options)
err = mnt->mnt_sb->s_op->show_options(m, mnt);
seq_puts(m, " 0 0\n");
return err;
***************
*** 845,852 ****
seq_putc(m, ' ');
mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none");
seq_puts(m, sb->s_flags & MS_RDONLY ? " ro" : " rw");
- show_sb_opts(m, sb);
- if (sb->s_op->show_options)
err = sb->s_op->show_options(m, mnt);
seq_putc(m, '\n');
return err;
--- 847,854 ----
seq_putc(m, ' ');
mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none");
seq_puts(m, sb->s_flags & MS_RDONLY ? " ro" : " rw");
+ err = show_sb_opts(m, sb);
+ if (!err && sb->s_op->show_options)
err = sb->s_op->show_options(m, mnt);
seq_putc(m, '\n');
return err;
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2008-04-08 22:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 17:24 [PATCH 2/2] SELinux: display SELinux mount options in /proc/mounts Eric Paris
2008-04-01 17:24 ` Eric Paris
2008-04-02 9:16 ` Miklos Szeredi
2008-04-02 12:53 ` Eric Paris
2008-04-02 14:43 ` Eric Paris
2008-04-02 14:48 ` Stephen Smalley
2008-04-02 15:04 ` Miklos Szeredi
2008-04-02 14:50 ` Miklos Szeredi
2008-04-02 15:06 ` Stephen Smalley
2008-04-02 15:14 ` Stephen Smalley
2008-04-04 22:22 ` [PATCH -v2] SELinux/LSM: " Eric Paris
2008-04-08 11:22 ` Miklos Szeredi
2008-04-08 15:09 ` Casey Schaufler
2008-04-08 22:36 ` James Morris [this message]
2008-04-08 22:42 ` Eric Paris
2008-04-09 2:45 ` James Morris
2008-04-09 7:53 ` Miklos Szeredi
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=Xine.LNX.4.64.0804090833250.25920@us.intercode.com.au \
--to=jmorris@namei.org \
--cc=eparis@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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.