Skip to contentSkip to conversation

fuse

DISCUSSION Luke Kenneth Casson Leighton 4 participants 7 messages Sep 22, 2004 – Oct 8, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

has anyone thought about how fuse (file system in userspace) would fit in with selinux?

i am going to be using fuse's fusexmp example program [in a production environment] to solve the problem of users removing usb media without warning.

fusexmp provides stateless proxy access to a linux filesystem, so if HAL chops off /media/usbdisk1 without warning, then the fusexmp mountpoint (say /home/user/proxyroot/media/usbdisk1) just... doesn't _care_.

l.

Signature · 13 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 4 lines · Luke Kenneth Casson Leighton

fusexmp provides stateless proxy access to a linux filesystem, so if HAL chops off /media/usbdisk1 without warning, then the fusexmp mountpoint (say /home/user/proxyroot/media/usbdisk1) just... doesn't _care_.

Somehow, I can't convince myself that isn't a good way to livelock the kernel because the VFS has locked something and then gone away for a LONG time in userspace - mostly because I've seen it all too many times with an NFS mount that includes 'hard' but *not* 'intr'...)

#2 lore raw
Quoted 11 lines · On Wed, Sep 22, 2004 at 09:55:49AM -0400, [email protected] wrote:
Quoted 4 lines · Luke Kenneth Casson Leighton

fusexmp provides stateless proxy access to a linux filesystem, so if HAL chops off /media/usbdisk1 without warning, then the fusexmp mountpoint (say /home/user/proxyroot/media/usbdisk1) just... doesn't _care_.

Somehow, I can't convince myself that isn't a good way to livelock the kernel because the VFS has locked something and then gone away for a LONG time in userspace - mostly because I've seen it all too many times with an NFS mount that includes 'hard' but *not* 'intr'...)

well, if there existed a kernel filesystem "proxy" module i'd use that instead, like a shot.

i _have_ encountered some weird VFS messages i'll let you know how i get on: they're due to a DVD being forcibly mounted (by KDE) and so i can't get it back.

a umount /media/dvdrom says "Device busy".

a umount -lf /media/dvdrom results in the weird VFS message.

Signature · 13 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
In reply to Luke Kenneth Casson Leighton
Quoted 2 lines · Luke Kenneth Casson Leighton

has anyone thought about how fuse (file system in userspace) would fit in with selinux?

In what way would it be different from any other file system?

Naturally you would need appropriate policy for the proxy program, but that should not be difficult to write.

Signature · 9 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#4 lore raw
Quoted 5 lines · Russell Coker
Quoted 2 lines · Luke Kenneth Casson Leighton

has anyone thought about how fuse (file system in userspace) would fit in with selinux?

In what way would it be different from any other file system?

oh, sorry, i should have said: fscontext, that sort of thing.

because it doesn't look like there's a way to pass fscontext arguments to the fuse module, and it uses man 2 mount() which doesn't take any arguments (except some flags, nothing that looks remotely like it could be used to pass an fscontext=), only the source and destination of the mount point (source = /proc/fs/fuse/dev, dest = /yourmountpoint).

Quoted 2 lines

Naturally you would need appropriate policy for the proxy program, but that should not be difficult to write.

i'm looking forward to it :)

Signature · 13 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#5 lore raw
Quoted 8 lines · Luke Kenneth Casson Leighton

oh, sorry, i should have said: fscontext, that sort of thing.

because it doesn't look like there's a way to pass fscontext arguments to the fuse module, and it uses man 2 mount() which doesn't take any arguments (except some flags, nothing that looks remotely like it could be used to pass an fscontext=), only the source and destination of the mount point (source = /proc/fs/fuse/dev, dest = /yourmountpoint).

No special interface for that, just passes the option string via the data parameter to mount(2). So if you are using the patched mount program, and fuse takes the typical string representation of mount options, then nothing special required to use fscontext=. Only filesystems that use a binary struct to pass the data require special handling, like NFS.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#6 lore raw
Quoted 6 lines · Stephen Smalley

No special interface for that, just passes the option string via the data parameter to mount(2). So if you are using the patched mount program, and fuse takes the typical string representation of mount options, then nothing special required to use fscontext=. Only filesystems that use a binary struct to pass the data require special handling, like NFS.

Actually, you don't even need the patched mount program; that is only required for the NFS case. Unpatched mount will happily pass the context= or fscontext= options down for you.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.