You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config: Make capabilities and noNewPrivileges Linux-only (again)
Roll back the genericization from 718f9f3 (minor narrative cleanup
regarding config compatibility, 2017-01-30, #673). Lifting the
restriction there seems to have been motivated by "Solaris supports
capabilities", but that was before the split into a capabilities
object which happened in eb114f0 (Add ambient and bounding capability
support, 2017-02-02, #675). It's not clear if Solaris supports
ambient caps, or what Solaris API noNewPrivileges were punting to [1].
And John Howard has recently confirmed that Windows does not support
capabilities and is unlikely to do so in the future [2]. He also
confirmed that Windows does not support rlimits [3]. John's statement
didn't directly address noNewPrivileges, but we can always restore any
of these properties to the Solaris/Windows platforms if/when we get
docs about which API we're punting to on those platforms.
Also add some backticks, remove the hyphens in "OPTIONAL) - the",
standardize lines I touch to use "the process" [4], and use four-space
indents here to keep Pandoc happy (see 7795661 (runtime.md: Fix
sub-bullet indentation, 2016-06-08, #495).
[1]: #673 (comment)
[2]: #810 (comment)
[3]: #835 (comment)
[4]: #809 (comment)
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: config.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,16 +156,6 @@ For POSIX platforms the `mounts` structure has the following fields:
156
156
***`env`** (array of strings, OPTIONAL) with the same semantics as [IEEE Std 1003.1-2008's `environ`][ieee-1003.1-2008-xbd-c8.1].
157
157
***`args`** (array of strings, REQUIRED) with similar semantics to [IEEE Std 1003.1-2008 `execvp`'s *argv*][ieee-1003.1-2008-xsh-exec].
158
158
This specification extends the IEEE standard in that at least one entry is REQUIRED, and that entry is used with the same semantics as `execvp`'s *file*.
159
-
***`capabilities`** (object, OPTIONAL) is an object containing arrays that specifies the sets of capabilities for the process.
160
-
Valid values are platform-specific.
161
-
For example, valid values for Linux are defined in the [capabilities(7)][capabilities.7] man page, such as `CAP_CHOWN`.
162
-
Any value which cannot be mapped to a relevant kernel interface MUST cause an error.
163
-
`capabilities` contains the following properties:
164
-
***`effective`** (array of strings, OPTIONAL) - the `effective` field is an array of effective capabilities that are kept for the process.
165
-
***`bounding`** (array of strings, OPTIONAL) - the `bounding` field is an array of bounding capabilities that are kept for the process.
166
-
***`inheritable`** (array of strings, OPTIONAL) - the `inheritable` field is an array of inheritable capabilities that are kept for the process.
167
-
***`permitted`** (array of strings, OPTIONAL) - the `permitted` field is an array of permitted capabilities that are kept for the process.
168
-
***`ambient`** (array of strings, OPTIONAL) - the `ambient` field is an array of ambient capabilities that are kept for the process.
169
159
***`rlimits`** (array of objects, OPTIONAL) allows setting resource limits for the process.
170
160
Each entry has the following structure:
171
161
@@ -176,13 +166,22 @@ For POSIX platforms the `mounts` structure has the following fields:
176
166
177
167
If `rlimits` contains duplicated entries with same `type`, the runtime MUST error out.
178
168
179
-
***`noNewPrivileges`** (bool, OPTIONAL) setting `noNewPrivileges` to true prevents the process from gaining additional privileges.
180
-
As an example, the ['no_new_privs'][no-new-privs] article in the kernel documentation has information on how this is achieved using a prctl system call on Linux.
181
-
182
169
For Linux-based systems the process structure supports the following process-specific fields.
183
170
184
171
***`apparmorProfile`** (string, OPTIONAL) specifies the name of the AppArmor profile for the process.
185
172
For more information about AppArmor, see [AppArmor documentation][apparmor].
173
+
***`capabilities`** (object, OPTIONAL) is an object containing arrays that specifies the sets of capabilities for the process.
174
+
Valid values are defined in the [capabilities(7)][capabilities.7] man page, such as `CAP_CHOWN`.
175
+
Any value which cannot be mapped to a relevant kernel interface MUST cause an error.
176
+
`capabilities` contains the following properties:
177
+
178
+
***`effective`** (array of strings, OPTIONAL) the `effective` field is an array of effective capabilities that are kept for the process.
179
+
***`bounding`** (array of strings, OPTIONAL) the `bounding` field is an array of bounding capabilities that are kept for the process.
180
+
***`inheritable`** (array of strings, OPTIONAL) the `inheritable` field is an array of inheritable capabilities that are kept for the process.
181
+
***`permitted`** (array of strings, OPTIONAL) the `permitted` field is an array of permitted capabilities that are kept for the process.
182
+
***`ambient`** (array of strings, OPTIONAL) the `ambient` field is an array of ambient capabilities that are kept for the process.
183
+
***`noNewPrivileges`** (bool, OPTIONAL) setting `noNewPrivileges` to true prevents the process from gaining additional privileges.
184
+
As an example, the [`no_new_privs`][no-new-privs] article in the kernel documentation has information on how this is achieved using a `prctl` system call on Linux.
186
185
***`oomScoreAdj`***(int, OPTIONAL)* adjusts the oom-killer score in `[pid]/oom_score_adj` for the process's `[pid]` in a [proc pseudo-filesystem][procfs].
187
186
If `oomScoreAdj` is set, the runtime MUST set `oom_score_adj` to the given value.
188
187
If `oomScoreAdj` is not set, the runtime MUST NOT change the value of `oom_score_adj`.
0 commit comments