All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Quigley <dpquigl@davequigley.com>
To: Sam Gandhi <samgandhi9@gmail.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: FUSE and SELinux labeling
Date: Sun, 15 May 2011 21:03:34 -0400	[thread overview]
Message-ID: <4DD077E6.5030309@davequigley.com> (raw)
In-Reply-To: <BANLkTim-1VFJHg1BdSjbWH-6RrfMHVBx3A@mail.gmail.com>

On 5/15/2011 10:40 AM, Sam Gandhi wrote:
> Hi
>
>
> Is there a FAQ or some description on what one needs to do to enable
> labeling on files created under a fuse filesystem?
>
> When I mount my fuse file system I see message like
>
> SELinux: initialized (dev fuse, type fuse), not configured for labeling
>
> Now if I use statement such as shown below in my SELinux policy before
> loading it I don't see those messages
>
> fs_use_xattr fuse system_u:object_r:fs_t;
>
> But then when I try to mount fuse file system using simple fuse hello
> program as hello /tmp/foo, I see message:
>
> SELinux: (dev fuse, type fuse) getxattr errno 4 on console and my system hangs!
>
>
> ( Has anybody been successful in adding the SELinux labels to file
> created  by fuse? I have search both fuse and SElinux mailing list,
> also done bit of google search and nothing comes up , either this is
> way too simple thing to do and I am missing obvious thing)
>
> Would appreciate any help.
>
> ( I had sent message earlier to fuse-devel, but didn't cross-post it
> to SELinux )
> -Sam
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
>

So the short answer to this is No you can't use xattr style labeling on 
fuse. Eric Paris in the past tried to do this but it was unsucessful. If 
I remember correctly there were some weird conditions in fuse which 
would cause deadlocks. Attempts were made to fix this problem but it 
seemed that it was an ideological issue just as much as a technical one. 
Someone had posted a similar question back around December or September 
I believe and it should have a more complete view of the problem. The 
list of things that would need to be done would be allow FUSE to pass 
the name of the fusefs to the security server so it can decide what to 
do with the particular fusefs. The second thing would be to fix the 
deadlock issue in fuse but I don't think you're going to make progress 
on that. Dominick in another thread said that fuse doesn't support 
xattrs. If that is the case then you would need to implement fuse xattr 
handlers as well and the fuse interface for them. This list probably 
isn't complete as I don't remember the full details of the conversation 
from back then.

Dave

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

      parent reply	other threads:[~2011-05-16  1:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-15 14:40 FUSE and SELinux labeling Sam Gandhi
2011-05-15 15:36 ` Dominick Grift
2011-05-16  0:47   ` Sam Gandhi
2011-05-16  5:55     ` Dominick Grift
2011-05-17  7:02     ` Daniel J Walsh
2011-05-17 13:12     ` Stephen Smalley
2011-05-16  1:03 ` Dave Quigley [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=4DD077E6.5030309@davequigley.com \
    --to=dpquigl@davequigley.com \
    --cc=samgandhi9@gmail.com \
    --cc=selinux@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.