]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
11 years agoubuntu templates: don't check for $rootfs/run/shm
Serge Hallyn [Thu, 7 Aug 2014 03:23:48 +0000 (03:23 +0000)] 
ubuntu templates: don't check for $rootfs/run/shm

/dev/shm must be turned from a directory into a symlink to /run/shm.
The templates do this only if they find -d $rootfs/run/shm.  Since /run
will be a tmpfs, checking for it in the rootfs is silly.  It also is
currently broken as ubuntu cloud images have an empty /run.

(this should fix https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1353734)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agobtrfs: support recursive subvolume deletion (v2)
Serge Hallyn [Fri, 1 Aug 2014 22:55:21 +0000 (22:55 +0000)] 
btrfs: support recursive subvolume deletion (v2)

Pull the #defines and struct definitions for btrfs into a separate
.h file to not clutter bdev.c

Implement btrfs recursive delete support

A non-root user isn't allow to do the ioctls needed for searching (as you can
verify with 'btrfs subvolume list').  So for an unprivileged user, if the
rootfs has subvolumes under it, deletion will fail.  Otherwise, it will
succeed.

Changelog: Aug 1:
  . Fix wrong objid passing when determining directory paths
  . In do_remove_btrfs_children, avoid dereferencing NULL dirid
  . Fix memleak in error case.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodoc: Add 'zfs' to the parameter of -B option in lxc-create(1)
KATOH Yasufumi [Fri, 1 Aug 2014 10:37:57 +0000 (19:37 +0900)] 
doc: Add 'zfs' to the parameter of -B option in lxc-create(1)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodoc: Update the description of SELinux in Japanese lxc.container.conf(5)
KATOH Yasufumi [Fri, 1 Aug 2014 10:37:56 +0000 (19:37 +0900)] 
doc: Update the description of SELinux in Japanese lxc.container.conf(5)

Update for commit 719fae0

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodoc: Add -F option to Japanese lxc-start(1)
KATOH Yasufumi [Fri, 1 Aug 2014 10:37:53 +0000 (19:37 +0900)] 
doc: Add -F option to Japanese lxc-start(1)

Update for commit 476d302

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agouse non-thread-safe getpwuid and getpwgid for android
Serge Hallyn [Thu, 31 Jul 2014 19:54:27 +0000 (19:54 +0000)] 
use non-thread-safe getpwuid and getpwgid for android

We only call it (so far) after doing a fork(), so this is fine.  If we
ever need such a thing from threaded context, we'll simply need to write
our own version for android.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoprint a helpful message if creating unpriv container with no idmap
Serge Hallyn [Tue, 29 Jul 2014 18:26:29 +0000 (18:26 +0000)] 
print a helpful message if creating unpriv container with no idmap

This gives me:

ubuntu@c-t1:~$ lxc-create -t download -n u1
lxc_container: No mapping for container root
lxc_container: Error chowning /home/ubuntu/.local/share/lxc/u1/rootfs to container root
lxc_container: You must either run as root, or define uid mappings
lxc_container: To pass uid mappings to lxc-create, you could create
lxc_container: ~/.config/lxc/default.conf:
lxc_container: lxc.include = /etc/lxc/default.conf
lxc_container: lxc.id_map = u 0 100000 65536
lxc_container: lxc.id_map = g 0 100000 65536
lxc_container: Error creating backing store type (none) for u1
lxc_container: Error creating container u1

when I create a container without having an id mapping defined.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agoprovide an example SELinux policy for older releases
Dwight Engen [Thu, 24 Jul 2014 21:25:46 +0000 (17:25 -0400)] 
provide an example SELinux policy for older releases

The virtd_lxc_t type provided by the default RHEL/CentOS/Oracle 6.5
policy is an unconfined_domain(), so it doesn't really enforce anything.
This change will provide a link in the documentation to an example
policy that does confine containers.

On more recent distributions with new enough policy, it is recommended
not to use this sample policy, but to use the types already available
on the system from /etc/selinux/targeted/contexts/lxc_contexts, ie:

process = "system_u:system_r:svirt_lxc_net_t:s0"
file = "system_u:object_r:svirt_sandbox_file_t:s0"

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agodownload: Have wget retry 3 times
Stéphane Graber [Mon, 21 Jul 2014 10:25:20 +0000 (12:25 +0200)] 
download: Have wget retry 3 times

This forces wget to retry if it gets a network error.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agolxc-start: Add -F (foreground) option
Stéphane Graber [Mon, 21 Jul 2014 09:50:49 +0000 (11:50 +0200)] 
lxc-start: Add -F (foreground) option

Introduce a new -F option (no-op for now) as an opposite of -d.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoapparmor: Allow slave bind mounts
Martin Pitt [Wed, 30 Jul 2014 14:43:10 +0000 (16:43 +0200)] 
apparmor: Allow slave bind mounts

Without this, if the system uses shared subtrees by default (like systemd), you
get a large stream of

  lxc-start: Permission denied - Failed to make /<mountpoint> rslave
  lxc-start: Continuing...

with

  apparmor="DENIED" operation="mount" info="failed flags match" error=-13
  profile="/usr/bin/lxc-start" name="/" pid=17284 comm="lxc-start" flags="rw, slave"

and eventual failure plus a lot of leftover mounts in the host.

https://launchpad.net/bugs/1325468

11 years agoadd help string for ubuntu templete
Trần Ngọc Quân [Mon, 28 Jul 2014 08:34:54 +0000 (15:34 +0700)] 
add help string for ubuntu templete

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agofix typo in btrfs error msg
Serge Hallyn [Sun, 27 Jul 2014 15:53:54 +0000 (10:53 -0500)] 
fix typo in btrfs error msg

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agounprivileged containers: use next available nic name if unspecified
Serge Hallyn [Mon, 21 Jul 2014 21:36:44 +0000 (16:36 -0500)] 
unprivileged containers: use next available nic name if unspecified

Rather than always using eth0.  Otherwise unpriv containers cannot have
multiple lxc.network.type = veth's without manually setting
lxc.network.name =.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agoSysvinit script fixes
Ansa89 [Thu, 17 Jul 2014 08:53:30 +0000 (10:53 +0200)] 
Sysvinit script fixes

Signed-off-by: Stefano Ansaloni <ansalonistefano@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoAdd SIGPWR support to lxc_init
Nikolay Martynov [Sun, 20 Jul 2014 19:35:04 +0000 (15:35 -0400)] 
Add SIGPWR support to lxc_init

This patch adds SIGPWR support to lxc_init.
This helps to properly shutdown lxc_init based containers.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoremove mountcgroup hook entirely
Serge Hallyn [Thu, 17 Jul 2014 22:20:34 +0000 (17:20 -0500)] 
remove mountcgroup hook entirely

Also fix the comment in lxc-cirros template (which I overlooked last time).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoRemove mention of mountcgroups in ubuntu.common config
Serge Hallyn [Thu, 17 Jul 2014 14:05:35 +0000 (09:05 -0500)] 
Remove mention of mountcgroups in ubuntu.common config

That mount hook predates the lxc.mount.auto = cgroup option.  So mention
that instead.

Perhaps we should simply drop the mountcgroup hook from the tree, but
I'm not doing that in this patch.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agolxc-test-{unpriv,usernic.in}: make sure to chgrp as well
Serge Hallyn [Thu, 17 Jul 2014 21:02:06 +0000 (16:02 -0500)] 
lxc-test-{unpriv,usernic.in}: make sure to chgrp as well

These tests are failing on new kernels because the container root is
not privileged over the directories, since privilege no requires
the group being mapped into the container.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agodoc: Add mention that veth.pair is ignored for unpriv in Japanese man
KATOH Yasufumi [Wed, 16 Jul 2014 16:32:38 +0000 (01:32 +0900)] 
doc: Add mention that veth.pair is ignored for unpriv in Japanese man

Update Japanese lxc.container.conf(5) for commit 8982c0f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodoc: Mention that veth.pair is ignored for unpriv
Stéphane Graber [Wed, 16 Jul 2014 01:32:46 +0000 (21:32 -0400)] 
doc: Mention that veth.pair is ignored for unpriv

veth.pair is ignore for unprivileged containers as allowing an
unprivileged user to set a specific device name would allow them to
trigger actions in tools like NetworkManager or other uevent based
handlers that may react based on specific names or prefixes being used.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agocentos template: prevent mingetty from calling vhangup(2)
Claudio Alarcon-Reyes [Fri, 11 Jul 2014 15:32:32 +0000 (11:32 -0400)] 
centos template: prevent mingetty from calling vhangup(2)

When using unprivileged containers, tty fails because of vhangup. Adding
--nohangup to nimgetty, it fixes the issue. This is the same problem
occurred for oracle template, commit 2e83f7201c5d402478b9849f0a85c62d5b9f1589

Signed-off-by: Claudio Alarcon clalarco@gmail.com
11 years agoFix typo in previous patch
Stéphane Graber [Mon, 14 Jul 2014 19:44:41 +0000 (15:44 -0400)] 
Fix typo in previous patch

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoconfile: sanity-check netdev->type before setting netdev->priv elements
Serge Hallyn [Mon, 14 Jul 2014 18:51:41 +0000 (18:51 +0000)] 
confile: sanity-check netdev->type before setting netdev->priv elements

The netdev->priv is shared for the netdev types.  A bad config file
could mix configuration for different types, resulting in a bad
netdev->priv when starting or even destroying a container.  So sanity
check the netdev->type before setting a netdev->priv element.

This should fix https://github.com/lxc/lxc/issues/254

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agorootfs_is_blockdev: don't run if no rootfs is specified
Serge Hallyn [Mon, 14 Jul 2014 18:22:53 +0000 (13:22 -0500)] 
rootfs_is_blockdev: don't run if no rootfs is specified

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agochange version to 1.0.5 in configure.ac lxc-1.0.5
Stéphane Graber [Mon, 14 Jul 2014 15:14:13 +0000 (11:14 -0400)] 
change version to 1.0.5 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agotests: lxc-test-ubuntu doesn't actually need bind9-host
Stéphane Graber [Wed, 9 Jul 2014 17:30:54 +0000 (13:30 -0400)] 
tests: lxc-test-ubuntu doesn't actually need bind9-host

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agotests: Clarify error message and fix return codes
Stéphane Graber [Wed, 9 Jul 2014 17:17:54 +0000 (13:17 -0400)] 
tests: Clarify error message and fix return codes

Reported-by: Michael J. Evans
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-debian: standardize formatting
Alexander Dreweke [Tue, 8 Jul 2014 05:16:54 +0000 (07:16 +0200)] 
lxc-debian: standardize formatting

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-debian: fix formatting
Alexander Dreweke [Tue, 8 Jul 2014 05:15:31 +0000 (07:15 +0200)] 
lxc-debian: fix formatting

added space ">/" -> ">  /"

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoAlso add --verison support to lxc-start-ephemeral
Stéphane Graber [Mon, 7 Jul 2014 16:48:07 +0000 (12:48 -0400)] 
Also add --verison support to lxc-start-ephemeral

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoAdd support for --version to lxc-ls and lxc-device
Stéphane Graber [Mon, 7 Jul 2014 14:17:28 +0000 (10:17 -0400)] 
Add support for --version to lxc-ls and lxc-device

This is based on the patch submitted by:
 Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>

Updated to use lxc.version rather than @LXC_VERSION@ and to apply to
both lxc-ls and lxc-device rather than just the former.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoFix attach_wait and threads
Dorian Eikenberg [Sun, 6 Jul 2014 17:44:19 +0000 (19:44 +0200)] 
Fix attach_wait and threads

Signed-off-by: Dorian Eikenberg <dorian.eikenberg@uni-duesseldorf.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoFix incorrect timeout handling of do_reboot_and_check()
Yuto KAWAMURA(kawamuray) [Fri, 4 Jul 2014 17:35:09 +0000 (02:35 +0900)] 
Fix incorrect timeout handling of do_reboot_and_check()

Currently do_reboot_and_check() is decreasing timeout variable even if
it is set to -1, so running 'lxc-stop --reboot --timeout=-1 ...' will
exits immediately at end of second iteration of loop, without waiting
container reboot.
Also, there is no need to call gettimeofday if timeout is set to -1, so
these statements should be evaluated only when timeout is enabled.

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoChange find_fstype_cb to ignore blank lines and comments
Yuto KAWAMURA(kawamuray) [Fri, 4 Jul 2014 17:40:02 +0000 (02:40 +0900)] 
Change find_fstype_cb to ignore blank lines and comments

/etc/filesystems could be contain blank lines and comments.
Change find_fstype_cb() to ignore blank lines and comments which starts
with '#'.

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoFix invalid seccomp profile name for Ubuntu.
Stéphane Graber [Fri, 4 Jul 2014 15:38:15 +0000 (11:38 -0400)] 
Fix invalid seccomp profile name for Ubuntu.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agomake the container exit code propagate to lxc-start exit code when appropriate
Rodrigo Vaz [Thu, 3 Jul 2014 18:39:51 +0000 (15:39 -0300)] 
make the container exit code propagate to lxc-start exit code when appropriate

Signed-off-by: Rodrigo Sampaio Vaz <rodrigo@heroku.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agochown_mapped_root: don't try chgrp if we don't own the file
Serge Hallyn [Thu, 3 Jul 2014 18:57:57 +0000 (13:57 -0500)] 
chown_mapped_root: don't try chgrp if we don't own the file

New kernels require that to have privilege over a file, your
userns must have the old and new groups mapped into your userns.
So if a file is owned by our uid but another groupid, then we
have to chgrp the file to our primary group before we can try
(in a new user namespace) to chgrp the file to a group id in the
namespace.

But in some cases (when cloning) the file may already be mapped
into the container.  Now we cannot chgrp the file to our own
primary group - and we don't have to.

So detect that case.  Only try to chgrp the file to our primary
group if the file is owned by our euid (i.e. not by the container)
and the owning group is not already mapped into the container by
default.

With this patch, I'm again able to both create and clone containers
with no errors again.

Reported-by: S.Çağlar Onur <caglar@10ur.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoEnable default seccomp profile for all distros
Stéphane Graber [Wed, 2 Jul 2014 01:38:18 +0000 (21:38 -0400)] 
Enable default seccomp profile for all distros

This updates the common config to include Serge's seccomp profile by
default for privileged containers.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoApparmor: allow hugetlbfs mounts everywhere
Jesse Tane [Mon, 30 Jun 2014 19:37:52 +0000 (15:37 -0400)] 
Apparmor: allow hugetlbfs mounts everywhere

Signed-off-by: Jesse Tane <jesse.tane@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoCast to gid_t to fix android build failure
Stéphane Graber [Mon, 30 Jun 2014 17:08:48 +0000 (13:08 -0400)] 
Cast to gid_t to fix android build failure

stat.st_gid is unsigned long in bionic instead of the expected gid_t, so
just cast it to gid_t.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoFix to work lxc-destroy with unprivileged containers on recent kernel
TAMUKI Shoichi [Sat, 28 Jun 2014 09:39:54 +0000 (18:39 +0900)] 
Fix to work lxc-destroy with unprivileged containers on recent kernel

Change idmap_add_id() to add both ID_TYPE_UID and ID_TYPE_GID entries
to an existing lxc_conf, not just an ID_TYPE_UID entry, so as to work
lxc-destroy with unprivileged containers on recent kernel.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoFix to work lxc-start with unprivileged containers on recent kernel
TAMUKI Shoichi [Fri, 27 Jun 2014 08:29:01 +0000 (17:29 +0900)] 
Fix to work lxc-start with unprivileged containers on recent kernel

Change chown_mapped_root() to map in both the root uid and gid, not
just the uid, so as to work lxc-start with unprivileged containers on
recent kernel.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoDon't call sig_name twice, use pointer instead
Alexander Vladimirov [Fri, 27 Jun 2014 17:32:30 +0000 (01:32 +0800)] 
Don't call sig_name twice, use pointer instead

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agocgm_get: make sure @value is null-terminated
Serge Hallyn [Fri, 27 Jun 2014 18:51:33 +0000 (13:51 -0500)] 
cgm_get: make sure @value is null-terminated

Previously this was done by strncpy, but now we just read
the len bytes - not including \0 - from a pipe, so pre-fill
@value with 0s to be safe.

This fixes the python3 api_test failure.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agocgmanager: have cgm_set and cgm_get use absolute path when possible
Serge Hallyn [Thu, 26 Jun 2014 21:44:46 +0000 (16:44 -0500)] 
cgmanager: have cgm_set and cgm_get use absolute path when possible

This allows users to get/set cgroup settings when logged into a different
session than that from which they started the container.

There is no cgmanager command to do an _abs variant of cgmanager_get_value
and cgmanager_set_value.  So we fork off a new task, which enters the
parent cgroup of the started container, then can get/set the value from
there.  The reason not to go straight into the container's cgroup is that
if we are freezing the container, or the container is already frozen, we'll
freeze as well :)  The reason to fork off a new task is that if we are
in a cgroup which is set to remove-on-empty, we may not be able to return
to our original cgroup after making the change.

This should fix https://github.com/lxc/lxc/issues/246

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoattach: Fix querying for the current personality
Stéphane Graber [Wed, 25 Jun 2014 19:33:30 +0000 (15:33 -0400)] 
attach: Fix querying for the current personality

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agoPrevent write_config from corrupting container config
Alexander Vladimirov [Tue, 24 Jun 2014 18:54:52 +0000 (02:54 +0800)] 
Prevent write_config from corrupting container config

write_config doesn't check the value sig_name function returns,
this causes write_config to produce corrupted container config when
using non-predefined signal names.

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoInclude ubuntu.priv.seccomp in dist tarball
Stéphane Graber [Fri, 20 Jun 2014 22:08:11 +0000 (18:08 -0400)] 
Include ubuntu.priv.seccomp in dist tarball

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoubuntu containers: use a seccomp filter by default (v2)
Serge Hallyn [Fri, 20 Jun 2014 20:40:42 +0000 (15:40 -0500)] 
ubuntu containers: use a seccomp filter by default (v2)

Blacklist module loading, kexec, and open_by_handle_at (the cause of the
not-docker-specific dockerinit mounts namespace escape).

This should be applied to all arches, but iiuc stgraber will be doing
some reworking of the commonizations which will simplify that, so I'm
not doing it here.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoseccomp: fix 32-bit rules
Serge Hallyn [Fri, 20 Jun 2014 19:58:41 +0000 (14:58 -0500)] 
seccomp: fix 32-bit rules

When calling seccomp_rule_add(), you must pass the native syscall number
even if the context is a 32-bit context.  So use resolve_name rather
than resolve_name_arch.

Enhance the check of /proc/self/status for Seccomp: so that we do not
enable seccomp policies if seccomp is not built into the kernel.  This
is needed before we can enable by-default seccomp policies (which we
want to do next)

Fix wrong return value check from seccomp_arch_exist, and remove
needless abstraction in arch handling.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoseccomp: support 'all' arch sections (plus bugfixes)
Serge Hallyn [Thu, 19 Jun 2014 20:52:34 +0000 (20:52 +0000)] 
seccomp: support 'all' arch sections (plus bugfixes)

seccomp_ctx is already a void*, so don't use 'scmp_filter_ctx *'

Separately track the native arch from the arch a rule is aimed at.

Clearly ignore irrelevant architectures (i.e. arm rules on x86)

Don't try to load seccomp (and don't fail) if we are already
seccomp-confined.  Otherwise nested containers fail.

Make it clear that the extra seccomp ctx is only for compat calls
on 64-bit arch.  (This will be extended to arm64 when libseccomp
supports it).  Power may will complicate this (if ever it is supported)
and require a new rethink and rewrite.

NOTE - currently when starting a 32-bit container on 64-bit host,
rules pertaining to 32-bit syscalls (as opposed to once which have
the same syscall #) appear to be ignored.  I can reproduce that without
lxc, so either there is a bug in seccomp or a fundamental
misunderstanding in how I"m merging the contexts.

Rereading the seccomp_rule_add manpage suggests that keeping the seccond
seccomp context may not be necessary, but this is not something I care
to test right now.  If it's true, then the code could be simplified, and
it may solve my concerns about power.

With this patch I'm able to start nested containers (with seccomp
policies defined) including 32-bit and 32-bit-in-64-bit.

[ this patch does not yet add the default seccomp policy ]

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agofix the expansion of libexecdir when not explicitly passed to configure
Dwight Engen [Fri, 20 Jun 2014 18:22:06 +0000 (14:22 -0400)] 
fix the expansion of libexecdir when not explicitly passed to configure

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agosplit -lcap and -lselinux out of LIBS
Dwight Engen [Thu, 19 Jun 2014 18:53:01 +0000 (14:53 -0400)] 
split -lcap and -lselinux out of LIBS

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agodon't force dropping capabilities in lxc-init
Dwight Engen [Thu, 19 Jun 2014 13:01:26 +0000 (09:01 -0400)] 
don't force dropping capabilities in lxc-init

Commit 0af683cf added clearing of capabilities to lxc-init, but only
after lxc_setup_fs() was done, likely so that the mounting done in
that routine wouldn't fail.

However, in my testing lxc_caps_reset() wasn't really effective
anyway since it did not clear the bounding set. Adding prctl
PR_CAPBSET_DROP in a loop from 0 to CAP_LAST_CAP would fix this, but I
don't think its necessary to forcefully clear all capabilities since
users can now specify lxc.cap.keep = none to drop all capabilities.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoFix typo in lxc_attach's usage
Stéphane Graber [Fri, 20 Jun 2014 18:04:44 +0000 (14:04 -0400)] 
Fix typo in lxc_attach's usage

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoseccomp: warn but continue on unresolvable syscalls
Serge Hallyn [Wed, 18 Jun 2014 19:36:37 +0000 (19:36 +0000)] 
seccomp: warn but continue on unresolvable syscalls

If a syscall is listed which is not resolvable, continue.  This allows
us to keep a more complete list of syscalls in a global seccomp policy
without having to worry about older kernels not supporting the newer
syscalls.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agobdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized
Leonid Isaev [Wed, 18 Jun 2014 02:21:47 +0000 (22:21 -0400)] 
bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized

Signed-off-by: Leonid Isaev <lisaev@umail.iu.edu>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-autostart: Respect -P
Stéphane Graber [Sat, 14 Jun 2014 19:58:24 +0000 (15:58 -0400)] 
lxc-autostart: Respect -P

-P was only used for log setup and not when retrieving the container list.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agotests: apparmor: Always end with a newline
Stéphane Graber [Fri, 13 Jun 2014 19:54:31 +0000 (15:54 -0400)] 
tests: apparmor: Always end with a newline

Some error messages in lxc-test-apparmor didn't end with a newline,
leading to slightly difficult to read output.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agotests: Don't fail when HOME isn't defined
Stéphane Graber [Fri, 13 Jun 2014 21:08:44 +0000 (17:08 -0400)] 
tests: Don't fail when HOME isn't defined

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agotests: Avoid the download template when possible
Stéphane Graber [Fri, 13 Jun 2014 21:45:26 +0000 (17:45 -0400)] 
tests: Avoid the download template when possible

The use of the download template with an hardcoded --arch=amd64 in aa.c
was causing test failures on any platform incapable of running amd64
binaries.

This wasn't noticed in the CI environment as we run the tests within
containers on an amd64 kernel but this caused failures on the Ubuntu CI
environment.

Instead, let's use the busybox template, tweaking the configuration when
needed to match the needs of the testcase.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agochange version to 1.0.4 in configure.ac lxc-1.0.4
Stéphane Graber [Fri, 13 Jun 2014 17:07:45 +0000 (13:07 -0400)] 
change version to 1.0.4 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agotests: Wait 5s for init to respond in lxc-test-autostart
Stéphane Graber [Mon, 9 Jun 2014 21:13:56 +0000 (17:13 -0400)] 
tests: Wait 5s for init to respond in lxc-test-autostart

lxc-test-autostart occasionaly fails at the restart test in the CI
environment. Looking at the current test case, the most obvious race
there is if lxc-wait exists succesfuly immediately after LXC marked the
container RUNNING (init spawned) but before init had a chance to setup
the signal handlers.

To avoid this potential race period, let's add a 5s delay between the
tests to give a chance for init to finish starting up.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agocgfs: Log the whole cgroup path too
Stéphane Graber [Mon, 9 Jun 2014 22:27:24 +0000 (18:27 -0400)] 
cgfs: Log the whole cgroup path too

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agocontainer start: check for start hooks in container rootfs
Serge Hallyn [Tue, 10 Jun 2014 03:29:11 +0000 (03:29 +0000)] 
container start: check for start hooks in container rootfs

Do so early enough that we can report a meaningful failure.

(This should fix https://github.com/lxc/lxc/issues/225)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agopython3: Fix crashes in snapshot()
Stéphane Graber [Mon, 9 Jun 2014 16:02:02 +0000 (12:02 -0400)] 
python3: Fix crashes in snapshot()

This makes sure all PyObject structs are always initialized to NULL,
this will fix issues such as (issue #239).

Also add a snapshot/list/restore testcase to the python3 api test code.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agodoc: Update Japanese man pages for the description of boot and group handling
KATOH Yasufumi [Thu, 5 Jun 2014 12:16:26 +0000 (21:16 +0900)] 
doc: Update Japanese man pages for the description of boot and group handling

Update lxc-autostart(1) and lxc.container.conf(5) for commit 015f0dd.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoBackport of autoboot/autostart rollup to stable-1.0
Michael H. Warfield [Thu, 5 Jun 2014 21:40:18 +0000 (17:40 -0400)] 
Backport of autoboot/autostart rollup to stable-1.0

Full backport of the autostart / autoboot rollup patch from
master to stable-1.0.

lxc-autostart: rework boot and group handling

This adds new functionality to lxc-autostart.

*) The -g / --groups option is multiple cummulative entry.
    This may be mixed freely with the previous comma separated
    group list convention.  Groups are processed in the
    order they first appear in the aggregated group list.

*) The NULL group may be specified in the group list using either a
    leading comma, a trailing comma, or an embedded comma.

*) Booting proceeds in order of the groups specified on the command line
    then ordered by lxc.start.order and name collalating sequence.

*) Default host bootup is now specified as "-g onboot," meaning that first
    the "onboot" group is booted and then any remaining enabled
    containers in the NULL group are booted.

*) Adds documentation to lxc-autostart for -g processing order and
    combinations.

*) Parameterizes bootgroups, options, and shutdown delay in init scripts
    and services.

*) Update the various init scripts to use lxc-autostart in a similar way.

Reported-by: CDR <venefax@gmail.com>
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoTry to be more helpful on container startup failure
Stéphane Graber [Wed, 4 Jun 2014 18:05:25 +0000 (14:05 -0400)] 
Try to be more helpful on container startup failure

This hides some of the confusing "command X failed to receive response"
why are usually caused by another more understandable error.

On failure to start() from lxc-start, a new error message is displayed,
suggesting the user sets logfile and loglevel and if using -d, restarts
the container in the foreground instead.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoSpecially handle block device rootfs
Serge Hallyn [Wed, 4 Jun 2014 15:16:10 +0000 (10:16 -0500)] 
Specially handle block device rootfs

It is not possible to mount a block device from a non-init user namespace.
Therefore if root on the host is starting a container with a uid
mapping, and the rootfs is a block device, then mount the rootfs before
we spawn the container init task.

This addresses https://github.com/lxc/lxc/issues/221

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-download: Attempt to get the GPG key 3 times
Stéphane Graber [Tue, 3 Jun 2014 19:11:43 +0000 (15:11 -0400)] 
lxc-download: Attempt to get the GPG key 3 times

This is to deal with the GPG pool occasionaly yielding broken servers.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agolxc-fedora.in: Correct some systemd target setups.
Michael H. Warfield [Tue, 3 Jun 2014 16:59:20 +0000 (12:59 -0400)] 
lxc-fedora.in: Correct some systemd target setups.

Set the halt.target action to be sigpwr.target.  This allows
SIGPWR to properly shut the container down from lxc-stop.

Renable the systemd-journald.service.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxcapi_snapshot: check that c is defined
Serge Hallyn [Tue, 3 Jun 2014 18:16:03 +0000 (13:16 -0500)] 
lxcapi_snapshot: check that c is defined

before using it, like the other snapshot api methods do.

This will need to go into stable-1.0 as well.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agopython3: Handle invalid global config keys
Stéphane Graber [Sun, 25 May 2014 14:33:37 +0000 (16:33 +0200)] 
python3: Handle invalid global config keys

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agopython3: Don't require a template name
Stéphane Graber [Sun, 25 May 2014 12:36:28 +0000 (14:36 +0200)] 
python3: Don't require a template name

The template name isn't required, if it's not passed, then create will
simply be asked to create a container without a rootfs.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoFree lxc configuration structure
bartekplus [Wed, 28 May 2014 19:17:37 +0000 (21:17 +0200)] 
Free lxc configuration structure

Signed-off-by: Bartosz Tomczyk <bartekplus@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoCorrected debug message
bartekplus [Mon, 2 Jun 2014 18:07:13 +0000 (20:07 +0200)] 
Corrected debug message

Signed-off-by: Bartosz Tomczyk <bartekplus@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-plamo: fix for configuring network interface
TAMUKI Shoichi [Tue, 3 Jun 2014 03:20:23 +0000 (12:20 +0900)] 
lxc-plamo: fix for configuring network interface

Fix configure_plamo so as not to configure wireless network interface
in containers even if the host uses wireless network interface.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agopoint user to updated man page in template boilerplate
Dwight Engen [Tue, 27 May 2014 19:30:10 +0000 (15:30 -0400)] 
point user to updated man page in template boilerplate

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agoconfigure.ac: don't let -lcgmanager end up in LIBS
Serge Hallyn [Tue, 3 Jun 2014 03:04:12 +0000 (22:04 -0500)] 
configure.ac: don't let -lcgmanager end up in LIBS

AC_SEARCH_LIBS always places the library being queried into LIBS.  We
don't want that - we were only checking whether a function is
available.  Not everything (notably not init.lxc.static) needs to
link against -lcgmanager.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoFix incorrect value used in comparison
bartekplus [Wed, 28 May 2014 15:52:24 +0000 (17:52 +0200)] 
Fix incorrect value used in comparison

Signed-off-by: Bartosz Tomczyk <bartekplus@gmail.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
11 years agoattach: get personality through get_config command
Serge Hallyn [Thu, 22 May 2014 21:53:40 +0000 (16:53 -0500)] 
attach: get personality through get_config command

Newer kernels optionally disallow reading /proc/$$/personality by
non-root users.  We can get the personality through the lxc command
interface, so do so.

Also try to be more consistent about personality being a signed long.
We had it as int, unsigned long, signed long throughout the code.

(This addresses bug
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1322067 :
3.15.0-1.x breaks lxc-attach for unprivileged containers)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodestroy the original container after making sure the snapshot exists (fixes #224)
S.Çağlar Onur [Sun, 25 May 2014 02:19:06 +0000 (22:19 -0400)] 
destroy the original container after making sure the snapshot exists (fixes #224)

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agomove bdev_specs struct into lxccontainer.h to allow API users to use it
S.Çağlar Onur [Wed, 21 May 2014 00:50:51 +0000 (20:50 -0400)] 
move bdev_specs struct into lxccontainer.h to allow API users to use it

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agounpriv tests: also move caller into unbound cgroups
Serge Hallyn [Wed, 21 May 2014 16:33:57 +0000 (11:33 -0500)] 
unpriv tests: also move caller into unbound cgroups

Otherwise the name=systemd cgroup isn't changed to one which
the lxc-unpriv user can write to, causing the test to fail.

This allows lxc-test-unpriv and lxc-test-usernic to pass when run in an
unprivileged container with cgmanager.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agocoverity: null check after dereference
Serge Hallyn [Wed, 21 May 2014 16:53:11 +0000 (11:53 -0500)] 
coverity: null check after dereference

we actually meant to check *p not p.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agolxc-oracle: fix ssh login under libvirt-lxc
Dwight Engen [Tue, 20 May 2014 20:46:10 +0000 (16:46 -0400)] 
lxc-oracle: fix ssh login under libvirt-lxc

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agocgmanager: slow down there (don't always grab abs cgroup path)
Serge Hallyn [Tue, 20 May 2014 16:47:17 +0000 (11:47 -0500)] 
cgmanager: slow down there (don't always grab abs cgroup path)

When I converted attach and enter to using move_pid_abs, these needed
to use the new get_pid_cgroup_abs method to get an absolute path.  But
for some inexplicable reason I also converted the functions which get
and set cgroup properties to use the absolute paths.  These are simply
not compatible with the cgmanager set_value and get_value methods.
This breaks for instance lxc-test-cgpath.

So undo that.  With this patch lxc-test-cgpath, lxc-test-autotest,
and lxc-test-concurrent once again pass in a nested container.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-oracle: set hostname with systemd
Dwight Engen [Tue, 20 May 2014 14:33:30 +0000 (10:33 -0400)] 
lxc-oracle: set hostname with systemd

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-devsetup: Don't use [[ because sh does not support it
ChangZhuo Chen (陳昌倬) [Tue, 20 May 2014 12:43:25 +0000 (20:43 +0800)] 
lxc-devsetup: Don't use [[ because sh does not support it

Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc-oracle: add pts/[1-4] to securetty for libvirt-lxc
Dwight Engen [Mon, 19 May 2014 21:53:45 +0000 (17:53 -0400)] 
lxc-oracle: add pts/[1-4] to securetty for libvirt-lxc

Don't spawn a getty on /dev/console when running under libvirt-lxc

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
11 years agoremove TODO file with old item in it
Dwight Engen [Mon, 19 May 2014 21:24:44 +0000 (17:24 -0400)] 
remove TODO file with old item in it

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agoFix syntax error in japanese manpage
Stéphane Graber [Mon, 19 May 2014 21:03:43 +0000 (23:03 +0200)] 
Fix syntax error in japanese manpage

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodoc: Update Japanese lxc.container.conf(5) for guidance of lxc.mount.entry
KATOH Yasufumi [Sat, 17 May 2014 17:23:31 +0000 (02:23 +0900)] 
doc: Update Japanese lxc.container.conf(5) for guidance of lxc.mount.entry

Update for commit 6191f4f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agolxc.container.conf(5): update guidance for lxc.mount.entry mount target
Serge Hallyn [Fri, 16 May 2014 14:14:16 +0000 (10:14 -0400)] 
lxc.container.conf(5): update guidance for lxc.mount.entry mount target

For years it has been best practice to use a relative path as
the mount target.  But the manpage hasn't reflect that.  Fix it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
11 years agoarchlinux template: fix lxc.root for btrfs backend
Edvinas Klovas [Sat, 10 May 2014 14:47:52 +0000 (16:47 +0200)] 
archlinux template: fix lxc.root for btrfs backend

when using btrfs backend lxc-create first creates rootfs in /usr/lib/lxc/rootfs
directory before moving it to /var/lib/lxc or other directory supplied by the
command line. Archlinux template relied in $rootfs_path which made containers
created with btrfs backend have lxc.rootfs set to /usr/lib/lxc/rootfs. By using
$path instead of $rootfs_path we make sure that lxc.rootfs is always correct.

Signed-off-by: Edvinas Klovas <edvinas@pnd.io>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
11 years agouse same ifndef/define format for all headers
S.Çağlar Onur [Fri, 9 May 2014 03:51:07 +0000 (23:51 -0400)] 
use same ifndef/define format for all headers

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agocgmanager: detect whether cgmanager supports name= subsystems
Serge Hallyn [Thu, 8 May 2014 17:23:53 +0000 (12:23 -0500)] 
cgmanager: detect whether cgmanager supports name= subsystems

On older cgmanager the support was broken.  So rather than
fail container starts altogether, just keep the old lxc behavior
in this case by not using name= subsystems.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
11 years agodoc: Fix Japanese lxc.container.conf(5)
KATOH Yasufumi [Thu, 8 May 2014 09:04:55 +0000 (18:04 +0900)] 
doc: Fix Japanese lxc.container.conf(5)

commit aafea1f was incomplete.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>