mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] file: seccomp sandboxing
@ 2018-06-27 15:24 Clemens Gruber
  2018-06-27 15:24 ` [ptxdist] [PATCH 2/2] file: add upstream seccomp patches Clemens Gruber
  0 siblings, 1 reply; 2+ messages in thread
From: Clemens Gruber @ 2018-06-27 15:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

Support seccomp sandboxing to reduce the attack surface and enable it by
default. Important for usecases with files from untrusted sources.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 rules/file.in   | 14 +++++++++++++-
 rules/file.make |  2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/rules/file.in b/rules/file.in
index a4e0a7125..3f44cc380 100644
--- a/rules/file.in
+++ b/rules/file.in
@@ -1,10 +1,11 @@
 ## SECTION=shell_and_console
 
-config FILE
+menuconfig FILE
 	tristate
 	select HOST_FILE
 	select ZLIB
 	select GCCLIBS_GCC_S
+	select LIBSECCOMP if FILE_SECCOMP
 	prompt "file"
 	help
 	  The file command is "a file type guesser", that is, a command-line tool
@@ -15,3 +16,14 @@ config FILE
 	  reliable, but requires a bit of I/O.
 	  
 	  http://www.darwinsys.com/file/
+
+if FILE
+
+config FILE_SECCOMP
+	bool
+	default y
+	prompt "enable seccomp sandboxing"
+	help
+	  Enables seccomp sandboxing to reduce the attack surface.
+
+endif
diff --git a/rules/file.make b/rules/file.make
index d60a0b045..bfa39ae76 100644
--- a/rules/file.make
+++ b/rules/file.make
@@ -37,7 +37,7 @@ FILE_CONF_OPT	:= \
 	--enable-elf \
 	--enable-elf-core \
 	--enable-zlib \
-	--disable-libseccomp \
+	--$(call ptx/endis, PTXCONF_FILE_SECCOMP)-libseccomp \
 	--disable-fsect-man5 \
 	$(GLOBAL_LARGE_FILE_OPTION) \
 	--disable-warnings
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-27 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-27 15:24 [ptxdist] [PATCH 1/2] file: seccomp sandboxing Clemens Gruber
2018-06-27 15:24 ` [ptxdist] [PATCH 2/2] file: add upstream seccomp patches Clemens Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox