From a6a0c163e79b841c85829f87193f025c67f879b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROBERTO=20=20MU=C3=91OZ?= Date: Fri, 23 Sep 2016 13:46:27 +0200 Subject: [PATCH 1/2] Added "noexec" mount option --- options.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/options.go b/options.go index 65ce8a54..f0111441 100644 --- a/options.go +++ b/options.go @@ -188,6 +188,15 @@ func AllowSUID() MountOption { } } +// NoExec disable de execution of binaries in the file system + +func NoExec() MountOption { + return func(conf *mountConfig) error { + conf.options["noexec"] = "" + return nil + } +} + // DefaultPermissions makes the kernel enforce access control based on // the file mode (as in chmod). // From 8ccc7fe40963637ce7e1fc4767e1207a50c91da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROBERTO=20=20MU=C3=91OZ?= Date: Fri, 23 Sep 2016 13:51:28 +0200 Subject: [PATCH 2/2] Errata in comment --- options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.go b/options.go index f0111441..ae185cd1 100644 --- a/options.go +++ b/options.go @@ -188,7 +188,7 @@ func AllowSUID() MountOption { } } -// NoExec disable de execution of binaries in the file system +// NoExec disable the execution of binaries on the file system func NoExec() MountOption { return func(conf *mountConfig) error {