Skip to content

syscall, os/exec: Support for User Namespaces #8447

@gopherbot

Description

@gopherbot

by mrunalp:

We are working on adding User Namespace support to docker/libcontainer, but running into
an issue where there is no opportunity to write UID/GID Mappings to a child process
after fork/exec leading to the child process losing capabilities.

Here is a proof-of-concept patch that will allow Go to support User Namespaces easily.

https://gist.github.com/mrunalp/7334e74a01b9a10e8546

Here is some sample code that will exercise the code above.

https://gist.github.com/mrunalp/4365565f94e9c9fd737c

Here is sample output from invoking the test program above.

https://gist.github.com/mrunalp/b684fdce11f2175b6d4d

I will be glad to clean up this patch to get this merged into Go.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions