moby/profiles/seccomp
Justin Cormack a01c4dc8f8 Align default seccomp profile with selected capabilities
Currently the default seccomp profile is fixed. This changes it
so that it varies depending on the Linux capabilities selected with
the --cap-add and --cap-drop options. Without this, if a user adds
privileges, eg to allow ptrace with --cap-add sys_ptrace then still
cannot actually use ptrace as it is still blocked by seccomp, so
they will probably disable seccomp or use --privileged. With this
change the syscalls that are needed for the capability are also
allowed by the seccomp profile based on the selected capabilities.

While this patch makes it easier to do things with for example
cap_sys_admin enabled, as it will now allow creating new namespaces
and use of mount, it still allows less than --cap-add cap_sys_admin
--security-opt seccomp:unconfined would have previously. It is not
recommended that users run containers with cap_sys_admin as this does
give full access to the host machine.

It also cleans up some architecture specific system calls to be
only selected when needed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-05-11 09:30:23 +01:00
..
fixtures move default seccomp profile into package 2016-01-21 16:55:29 -08:00
default.json Align default seccomp profile with selected capabilities 2016-05-11 09:30:23 +01:00
generate.go Align default seccomp profile with selected capabilities 2016-05-11 09:30:23 +01:00
seccomp.go Align default seccomp profile with selected capabilities 2016-05-11 09:30:23 +01:00
seccomp_default.go Align default seccomp profile with selected capabilities 2016-05-11 09:30:23 +01:00
seccomp_test.go add seccomp default profile fix tests 2016-02-19 13:32:54 -08:00
seccomp_unsupported.go Align default seccomp profile with selected capabilities 2016-05-11 09:30:23 +01:00