Implement lxc.rootfs.options

This introduces a new lxc.rootfs.options which lets you pass new
mountflags/mountdata when mounting the root filesystem.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Fix the timeout == 0 case in lxcapi_shutdown()

The timeout argument should be handled as follows:
   -1 => Wait forever
    0 => Don't wait
  > 0 => Wait for timeout seconds

Without this patch, the 0 case is mapped to -1.

Signed-off-by: Robert Vogelgesang <vogel@users.sourceforge.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
cgmanager: chmod the container's base directory 775

In order for attach to work, the container owner must be able to
write to the tasks file.  Therefore we make the container's cgroup
owned by the container root group, but the container owner uid.
So for the container root to be allowed to create new cgroups, it
needs group write perms.

With this patch, an unprivileged container with an
lxc.mount.auto = cgroup entry entry can run the cgproxy and pass
all cgmanager tests.

Acls would have been another way to do this, but are not yet being
used/exported by cgmanager.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
shutdown: Rework API and lxc-stop

With this change, shutdown() will no longer call stop() after the
timeout, instead it'll just return false and it's up to the caller to
then call stop() if appropriate.

This also updates the bindings, tests and other scripts.

lxc-stop is then updated to do proper option checking and use shutdown,
stop or reboot as appropriate.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>