Browse code

Expand the documentation of "no-new-privileges"

The change to runc in https://github.com/opencontainers/runc/pull/789
was not documented previously. Also say what this affects and clean
up layout of initial table as there was some miscolouration of the
continuation lines.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 3050d9af9b2384baed599be9d7142b4775f89e10)
Signed-off-by: Tibor Vass <tibor@docker.com>

Justin Cormack authored on 2016/07/13 22:41:58
Showing 1 changed files
... ...
@@ -630,10 +630,8 @@ with the same logic -- if the original volume was specified with a name it will
630 630
     --security-opt="label=type:TYPE"   : Set the label type for the container
631 631
     --security-opt="label=level:LEVEL" : Set the label level for the container
632 632
     --security-opt="label=disable"     : Turn off label confinement for the container
633
-    --security-opt="apparmor=PROFILE"  : Set the apparmor profile to be applied
634
-                                         to the container
635
-    --security-opt="no-new-privileges" : Disable container processes from gaining
636
-                                         new privileges
633
+    --security-opt="apparmor=PROFILE"  : Set the apparmor profile to be applied to the container
634
+    --security-opt="no-new-privileges" : Disable container processes from gaining new privileges
637 635
     --security-opt="seccomp=unconfined": Turn off seccomp confinement for the container
638 636
     --security-opt="seccomp=profile.json: White listed syscalls seccomp Json file to be used as a seccomp filter
639 637
 
... ...
@@ -665,7 +663,10 @@ privileges, you can execute the following command:
665 665
 
666 666
     $ docker run --security-opt no-new-privileges -it centos bash
667 667
 
668
-For more details, see [kernel documentation](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt).
668
+This means that commands that raise privileges such as `su` or `sudo` will no longer work.
669
+It also causes any seccomp filters to be applied later, after privileges have been dropped
670
+which may mean you can have a more restrictive set of filters.
671
+For more details, see the [kernel documentation](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt).
669 672
 
670 673
 ## Specifying custom cgroups
671 674