From 0dfaa72ce1313ab5a43f1cb501fd87e2f367283f Mon Sep 17 00:00:00 2001 From: Josh Hawn Date: Wed, 25 Nov 2015 09:25:30 -0800 Subject: [PATCH] Add mount options AllowDev and AllowSUID fixes https://github.com/bazil/fuse/issues/114 Docker-DCO-1.1-Signed-off-by: Josh Hawn (github: jlhawn) --- options.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/options.go b/options.go index 6cdd43a8..caee4953 100644 --- a/options.go +++ b/options.go @@ -144,6 +144,24 @@ func AllowRoot() MountOption { } } +// AllowDev enables interpreting character or block special devices on the +// filesystem. +func AllowDev() MountOption { + return func(conf *mountConfig) error { + conf.options["dev"] = "" + return nil + } +} + +// AllowSUID allows set-user-identifier or set-group-identifier bits to take +// effect. +func AllowSUID() MountOption { + return func(conf *mountConfig) error { + conf.options["suid"] = "" + return nil + } +} + // DefaultPermissions makes the kernel enforce access control based on // the file mode (as in chmod). //