ct: Add libct_container_uname() API call that sets host/domain-names

This one is dependent on CLONE_NEWUTS

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libctd: Simplify responce sending for simple ones

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libctd: Sanitation

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pbunix: Merge pack_ct_req into pbunix_send_ct_req

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rpc: Handle error codes from rpc properly

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct: Introduce option for mounting cgroups inside CT

Cgroups created for container will be bind mounted as
root cgroup into container's FS.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
fs: Fix re-mounting CT's own /proc

Main change is -- we can have proc in either new
mount namespace or withint chroot.

Other than this, report error if mounting new proc
is impossible.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
uts: Don't forget to free host/domain-names

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ct: Helper for setting uname values

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cg: Implement bind-mounting cgroups subs into CT

Now only works for new mount namespaces with root. This is
possible for both simple chroot and for shared root in new
mount namespace, but requires more coding.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
uapi: libct -- Add missing arguments name

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
docs: Add building of manpages in pfd format

Note it requires dblatex package to be installed.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
docs: Add libct documentation

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
docs: Fix some points and add new option

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
fs: Fix template name for pivot-root directory

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
fs: Mark fs in new NS as alave recursively

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Add test for root-ed mntns container

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cg: Don't add / to root path when mounting cgroup-subs

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Add test for cgroup subs

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Add comments describing what each test does

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>