Re: [PATCH 2/2] SELinux: display SELinux mount options in /proc/mounts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Wed, 2008-04-02 at 11:16 +0200, Miklos Szeredi wrote:
> > Where's 1/2?  I've ported this to the tip of the vfs-2.6 tree, but
> > can't compile it without the other half.
> 
> I have a question for everyone though.  How are these options used?
> SELinux mount options can contain commas.  When sending such options
> from userspace they are inside quotes.  Should I go ahead and quote
> selinux options so they can be directly used back into mount commands?

Yes.

> Should I just leave them in there without quotes and let anyone who
> tries to feel them back into mount figure it out?

Ideally copying the options out of /proc/mounts, then doing a mount
with those options should exactly duplicate the original mount.

> I'm ignoring seq_* failures.  Which kinda scares me since it means i
> could get half of one option and half of another and the user would not
> realize it.  Maybe I should build a single string for each selinux
> option and do a single seq_puts() so seq_* failure only means missing
> options, not possibly corrupted options...

Errors from seq_* can be safely ignored, seq_file remembers that there
was an error.

Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux