api: Introduce API call for setting capabilities

vzctl sets bset and all caps, lxc -- only bset. This is
an attempt to implement API simple and generic enough
for handling both in the minimal amount of calls.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
caps: Implement setting capabilities

Copied (and enlightened) from vzctl code.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct: fs -- Allocate/free struct fs_mount with helpers

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct: cgroups -- Add cg_config_alloc/cg_config_free helpers

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct: Use snprintf instead of unsafe sprintf

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