]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/conf.c
conf: use minimal {g,u}id map
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 May 2017 09:21:29 +0000 (11:21 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 1 Jun 2017 21:54:47 +0000 (23:54 +0200)
commitf8aa4bf3089e5c1e74f913bc057725128181c6ee
tree9966f3b4829276391b7bab72d9da852d303a6eca
parent493c62361945cf7f1b097465613a57062cff1728
conf: use minimal {g,u}id map

Afaict, userns_exec_1() is only used to operate based on privileges for the
user's own {g,u}id on the host and for the container root's unmapped {g,u}id.
This means we require only to establish a mapping from:
- the container root {g,u}id as seen from the host -> user's host {g,u}id
- the container root -> some sub{g,u}id

The former we add, if the user did not specifiy a mapping. The latter we
retrieve from the ontainer's configured {g,u}id mappings.

Closes #1598.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c