test: check that CT is executed in a new session (v3)

with own control terminal.

v2: don't wait pid from libct_container_spawn_execvfds
v3: s/libct_container_set_console/libct_container_set_console_fd

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ct: fix value of CT_NOSETSID

CT_NOSETSID has to contain one bit

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
util: move bind_mount in util.c

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: create destination for bind-mounts if it isn't exist

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: bind-mount root into itself

It handles a situation when a root isn't a mount-point and it's required
for userns, because the origin root will be locked and pivot_root will fail.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
debug: logfd = 2
ct: add ability to add devices in container
fs: add suppor of read-only and private bind-mounts

Signed-off-by: Andrey Vagin <avagin@openvz.org>
ct: don't use ... in set_options

I can't find how to handle it to create go bindings
libct: add initial go bindings

This patch is a prototype. I'm going to implement all other functions,
when all of you will say that it's what we want.

Cc: Michael Crosby <crosbymichael@gmail.com>
Cc: Dmitry Guryanov <dguryanov@parallels.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
ct: mount proc if CT doesn't use host root
go: AddNetVeth
Add libnl

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libnl
return net_dev_t
libct_net_dev_set_mac
go: NetDev
peer
xxx
xxx