]> git.ipfire.org Git - thirdparty/libvirt.git/commit
LXC: Fix virLXCControllerSetupDevPTS() wrt user namespaces
authorRichard Weinberger <richard@nod.at>
Mon, 28 Jul 2014 20:59:17 +0000 (22:59 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 14 Aug 2014 12:32:49 +0000 (14:32 +0200)
commit41885a0224850c4aedd429e07d95be7f2eda5695
tree31adbc9f356ff777d76b346920c956a85b50b39c
parent49cd6815d62844af9dd07f27bf4a6463f5733022
LXC: Fix virLXCControllerSetupDevPTS() wrt user namespaces

The gid value passed to devpts has to be translated by hand as
virLXCControllerSetupDevPTS() is called before setting up the user
and group mappings.
Otherwise devpts will use an unmapped gid and openpty()
will fail within containers.
Linux kernel commit 23adbe12
("fs,userns: Change inode_capable to capable_wrt_inode_uidgid")
uncovered that issue.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/lxc/lxc_controller.c