-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treating unknown/unavailable capabilities #4426
Comments
Here is how I see this. We should distinguish between two types of issues:
We should probably clarify that in runtime-spec, too. An exception to 2 is (d). Since we happened to ignore errors from setting ambient capabilities, we should not error out as it might break some users. Instead, introduce a warning and change it to an error in a later version. So, answering my questions above:
|
Maybe we can add some option fields in runtime-spec, the aim of it is to let the user decide whether show an error or a warning. |
Description
This is more of a request for comments than a bug.
Background
(a) runc and runtime-spec used to treat capabilities from config.json as a must (i.e. if a requested capability could not be set, an error must be returned).
(b) This has changed in runtime-spec since opencontainers/runtime-spec#1094. The spec now says:
(c) The above change was partially implemented in #2854. By "partially" I mean that runc now warns, not errors, in the following two cases:
(d) Also, due to a bug in capability package (fixed in it's moby/sys fork, see kolyshkin/capability#3), any error when raising an ambient capability (using
prctl(PR_CAP_AMBIENT)
) which is not present in both the permitted and the inheritable sets was silently ignored.(e) For all other cases, such as when a valid (known and supported) capability can not be granted, runc still returns an error. This includes:
prctl(PR_CAPBSET_DROP)
) when runc doesn't haveCAP_SETPCAP
(unlikely to happen);Questions
@opencontainers/runc-maintainers PTAL.
The text was updated successfully, but these errors were encountered: