Skip to content

Conversation

@justincormack
Copy link
Contributor

Since Linux 4.3 ambient capabilities are available. If set these allow unprivileged child
processes to inherit capabilities, while at present there is no means to set capabilities
on non root processes, other than via filesystem capabilities which are not usually
supported in image formats.

With ambient capabilities non root processes can be given capabilities as well, and so
the main reason to use root in containers goes away, and capabilities work as expected.

The code falls back to the existing behaviour if ambient capabilities are not supported.

Signed-off-by: Justin Cormack [email protected]

Since Linux 4.3 ambient capabilities are available. If set these allow unprivileged child
processes to inherit capabilities, while at present there is no means to set capabilities
on non root processes, other than via filesystem capabilities which are not usually
supported in image formats.

With ambient capabilities non root processes can be given capabilities as well, and so
the main reason to use root in containers goes away, and capabilities work as expected.

The code falls back to the existing behaviour if ambient capabilities are not supported.

Signed-off-by: Justin Cormack <[email protected]>
@justincormack
Copy link
Contributor Author

cc @mrunalp @crosbymichael

@justincormack
Copy link
Contributor Author

Docker PR moby/moby#26979 but I don't think any decisions about whether to reduce capabilities for non root users affect runc these are just policy.

@mrunalp
Copy link
Contributor

mrunalp commented Sep 28, 2016

Looks fine. I'll test it out and then ack it :)

@crosbymichael
Copy link
Member

crosbymichael commented Sep 28, 2016

LGTM

Approved with PullApprove

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Sep 28, 2016

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit b3833a0 into opencontainers:master Sep 28, 2016
@justincormack justincormack deleted the ambient branch September 28, 2016 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants