]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/conf.c
lxc.id_map bug when writing directly to /proc/pid/[ug]id_map [PATCH]
authorMiquel van Smoorenburg <mikevs@xs4all.net>
Wed, 5 Feb 2014 22:38:11 +0000 (23:38 +0100)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 6 Feb 2014 05:34:51 +0000 (23:34 -0600)
commitd1838f34596635ca0684618a029cd691d8e3437d
tree37fbef047705fa1f04948db024ca5efb767f1ddc
parentee165ff89d52024cfe29f78c14315cef030c98d5
lxc.id_map bug when writing directly to /proc/pid/[ug]id_map [PATCH]

lxc.id_map bug when writing directly to /proc/pid/[ug]id_map

There's some code in src/lxc/conf.c that sets up the UID/GID mapping. It
can use the external newuidmap/newgidmap tools, or it can write to
/proc/pid/[ug]id_map directly. The latter case is broken: lines are written
without a newline (\n) at the end. This patch fixes that. Note that
I did not check if the newuidmap/newgidmap case still works. It should,
but I wasn't able to test it.

Signed-off-by: Miquel van Smoorenburg <mikevs@xs4all.net>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c