aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Dalvik Khertel <khertel@outlook.com>2012-08-09 12:48:20 +0000
committerGravatar Miklos Szeredi <mszeredi@suse.cz>2013-02-08 08:03:01 +0100
commitc52cafc81ced83fbd5cc7edf4ef5f7cb57b82729 (patch)
tree293c3c08aed6fee27283daefe9bfc32801240491 /lib
parentc66e7f4e71a10e0a06d903d11acad8cc6b99c16a (diff)
libfuse: pass security context options to kernel
Mount can be used with an "-o context=" option in order to specify a mountpoint-wide SELinux security context different from the default context provided by the active SELinux policy. This is useful in order to enable users to mount multiple sshfs targets under distinct contexts, which is my main motivation for getting this patch mainlined.
Diffstat (limited to 'lib')
-rw-r--r--lib/mount.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mount.c b/lib/mount.c
index 6182a17..01f64da 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -97,6 +97,10 @@ static const struct fuse_opt fuse_mount_opts[] = {
FUSE_OPT_KEY("large_read", KEY_KERN_OPT),
FUSE_OPT_KEY("blksize=", KEY_KERN_OPT),
FUSE_OPT_KEY("default_permissions", KEY_KERN_OPT),
+ FUSE_OPT_KEY("context=", KEY_KERN_OPT),
+ FUSE_OPT_KEY("fscontext=", KEY_KERN_OPT),
+ FUSE_OPT_KEY("defcontext=", KEY_KERN_OPT),
+ FUSE_OPT_KEY("rootcontext=", KEY_KERN_OPT),
FUSE_OPT_KEY("max_read=", KEY_KERN_OPT),
FUSE_OPT_KEY("max_read=", FUSE_OPT_KEY_KEEP),
FUSE_OPT_KEY("user=", KEY_MTAB_OPT),