]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
9 years agolxc-attach: add comment, & implement login_tty() 839/head
Christian Brauner [Mon, 22 Feb 2016 11:27:06 +0000 (12:27 +0100)] 
lxc-attach: add comment, & implement login_tty()

- The code required to prepare an fd to act as a login tty is shared among
  pty_on_host_callback() and fork_pty(). This implements login_pty(), a
  minimalistic login_tty() clone, to avoid code redundancy.
- Give pty_in_container() a slightly extended comment.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #837 from tenforward/japanese_man
Stéphane Graber [Mon, 22 Feb 2016 06:30:21 +0000 (01:30 -0500)] 
Merge pull request #837 from tenforward/japanese_man

doc: Add Japanese description of cgns apparmor profile in lxc.container.conf(5)

9 years agodoc: Add Japanese description of cgns apparmor profile in lxc.container.conf(5) 837/head
KATOH Yasufumi [Mon, 22 Feb 2016 06:21:40 +0000 (15:21 +0900)] 
doc: Add Japanese description of cgns apparmor profile in lxc.container.conf(5)

Update for commit 7a126ae

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agoMerge pull request #836 from hallyn/2016-02-21/cgns.aa
Stéphane Graber [Mon, 22 Feb 2016 05:37:00 +0000 (00:37 -0500)] 
Merge pull request #836 from hallyn/2016-02-21/cgns.aa

2016 02 21/cgns.aa

9 years agoupdate tests to recognize cgns profile 836/head
Serge Hallyn [Mon, 22 Feb 2016 05:09:42 +0000 (21:09 -0800)] 
update tests to recognize cgns profile

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agolxc.container.conf / apparmor : document cgns profile
Serge Hallyn [Mon, 22 Feb 2016 04:46:58 +0000 (20:46 -0800)] 
lxc.container.conf / apparmor : document cgns profile

Also document 'unchanged' which we had never documented before.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoallow cgroup mounting in nesting profile
Serge Hallyn [Sun, 21 Feb 2016 23:52:07 +0000 (15:52 -0800)] 
allow cgroup mounting in nesting profile

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoApparmor: use lxc-default-cgns if cgns is enabled
Serge Hallyn [Sun, 21 Feb 2016 23:51:37 +0000 (15:51 -0800)] 
Apparmor: use lxc-default-cgns if cgns is enabled

Because containers need to - and safely can - mount cgroufs in that
case.

Note that if cgns is enabled but the unshare fails, we fail the container
start, so checking whether they are enabled is enough.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoadd lxc-default-cgns profile
Serge Hallyn [Sun, 21 Feb 2016 23:38:11 +0000 (15:38 -0800)] 
add lxc-default-cgns profile

This isn't safe for privileged containers which do not use cgroup
namespaces, but is required for systemd containers with cgroup
namespaces.  So create a new profile for it which lxc will use as
the default when it knows it can.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #835 from brauner/2016-02-15/lxc_attach_pty
Stéphane Graber [Sun, 21 Feb 2016 22:44:52 +0000 (17:44 -0500)] 
Merge pull request #835 from brauner/2016-02-15/lxc_attach_pty

fix android build

9 years agofix android build 835/head
Christian Brauner [Sun, 21 Feb 2016 22:14:23 +0000 (23:14 +0100)] 
fix android build

bionic libc doesn't know _Exit(). Replace it with _exit().

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #825 from brauner/2016-02-15/lxc_attach_pty
Serge Hallyn [Sun, 21 Feb 2016 19:16:36 +0000 (11:16 -0800)] 
Merge pull request #825 from brauner/2016-02-15/lxc_attach_pty

make lxc-attach use a pty

9 years agomake lxc-attach use a pty 825/head
Christian Brauner [Mon, 15 Feb 2016 21:10:40 +0000 (22:10 +0100)] 
make lxc-attach use a pty

So far lxc-attach did not use a pty when attaching to a container. This made it
vulnerable to tty input faking via TIOCSTI when switching to a different user.
This patch makes lxc-attach use a pty in most cases. The only current exemption
is when stdin, stdout, and stderr are not referring to a pty.

There are two ways how lxc-attach can receive a pty:
1. get a pty in the container
2. get a pty on the host
This patch makes 1. the default and only opts for 2. when 1. fails before
giving up. The rationale behind this is as follows: If we create a pty on the
host (2.) and pass the fds to the container the container may report "no tty"
when the "tty" command is used. This could be irritating for users when they
expect that lxc-attach now always tries to use a pty. Hence, option 1. is the
default.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoclean exit on EPOLLHUP
Christian Brauner [Thu, 18 Feb 2016 14:20:34 +0000 (15:20 +0100)] 
clean exit on EPOLLHUP

lxc_console_cb_tty_masterfd() unnecessarily reported a read/write error when
the fd was closed. This happens e.g. when we have allocated a tty in the
container with lxc-console and we shut the container down. lxc-console will
then exit with an error message. This patch introduces a test whether the
EPOLLHUP bit is set in the events mask. If so, we report no error.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agorewrite lxc_console_set_stdfds
Christian Brauner [Wed, 17 Feb 2016 18:48:54 +0000 (19:48 +0100)] 
rewrite lxc_console_set_stdfds

Make lxc_console_set_stdfds useable by other callers that do not have access to
lxc_handler.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agomake tty helper functions extern
Christian Brauner [Mon, 15 Feb 2016 18:40:55 +0000 (19:40 +0100)] 
make tty helper functions extern

- lxc_console_cb_tty_stdin()
- lxc_console_cb_tty_master()
- lxc_setup_tios(int fd, struct termios *oldtios);
- lxc_console_winsz(int srcfd, int dstfd);
- lxc_console_cb_sigwinch_fd(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr);
- lxc_tty_state *lxc_console_sigwinch_init(int srcfd, int dstfd);
- lxc_console_sigwinch_fini(struct lxc_tty_state *ts);

We can make use these functions in other modules.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agomake escape sequence to exit tty optional
Christian Brauner [Mon, 15 Feb 2016 18:38:32 +0000 (19:38 +0100)] 
make escape sequence to exit tty optional

We want to reuse lxc_console_cb_tty_stdin() in lxc_attach.c.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #833 from mar-kolya/fix-sshd-template-init-location-for-systemd
Stéphane Graber [Sun, 21 Feb 2016 07:03:24 +0000 (02:03 -0500)] 
Merge pull request #833 from mar-kolya/fix-sshd-template-init-location-for-systemd

Fix sshd template on systems with systemd

9 years agoFix sshd template on systems with systemd 833/head
Nikolay Martynov [Sun, 21 Feb 2016 06:16:15 +0000 (01:16 -0500)] 
Fix sshd template on systems with systemd

Systems with systemd have /sbin/init as a symlink pointing to real init.
Sshd template tries to bind-mount special init implementation.
The problem is that one cannot bind-mount to a location that is a symlink.

Fix this by deferencing /sbin/init symling and using that as bind-mount location.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
9 years agodoc: add LXC_CGNS_AWARE env to Japanese lxc.container.conf(5)
KATOH Yasufumi [Sun, 21 Feb 2016 05:54:07 +0000 (00:54 -0500)] 
doc: add LXC_CGNS_AWARE env to Japanese lxc.container.conf(5)

Update for commit c4cafa0

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #832 from stgraber/master
Serge Hallyn [Sat, 20 Feb 2016 05:02:01 +0000 (21:02 -0800)] 
Merge pull request #832 from stgraber/master

Fix typo in lxc manpage

9 years agoFix typo in lxc manpage 832/head
Stéphane Graber [Sat, 20 Feb 2016 04:37:07 +0000 (23:37 -0500)] 
Fix typo in lxc manpage

Reported-by: lintian
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #831 from hallyn/2016-02-19/cgfs
Stéphane Graber [Sat, 20 Feb 2016 03:13:36 +0000 (22:13 -0500)] 
Merge pull request #831 from hallyn/2016-02-19/cgfs

2016 02 19/cgfs

9 years agolxc: cgfs: handle lxcfs 831/head
Ubuntu [Sat, 20 Feb 2016 02:25:55 +0000 (02:25 +0000)] 
lxc: cgfs: handle lxcfs

When containers have lxcfs mounted instead of cgroupfs, we have to
process /proc/self/mountinfo a bit differently.  In particular, we
should look for fuse.lxcfs fstype, we need to look elsewhere for the
list of comounted controllers, and the mount_prefix is not a cgroup path
which was bind mounted, so we should ignore it, and named subsystems
show up without the 'name=' prefix.

With this patchset I can start containers inside a privileged lxd
container with lxcfs mounted (i.e. without cgroup namespaces).

Closes #830

Signed-off-by: Ubuntu <ubuntu@localhost.localdomain>
9 years agocgfs: also check for EACCES when writing devices
Serge Hallyn [Sat, 20 Feb 2016 02:43:50 +0000 (18:43 -0800)] 
cgfs: also check for EACCES when writing devices

Because that's what lxcfs gives us.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #829 from hallyn/2016-02-19/devices
Stéphane Graber [Fri, 19 Feb 2016 23:25:02 +0000 (18:25 -0500)] 
Merge pull request #829 from hallyn/2016-02-19/devices

cgroups: do not fail if setting devices cgroup fails due to EPERM

9 years agocgroups: do not fail if setting devices cgroup fails due to EPERM 829/head
Serge Hallyn [Fri, 19 Feb 2016 22:12:47 +0000 (14:12 -0800)] 
cgroups: do not fail if setting devices cgroup fails due to EPERM

If we're trying to allow a device which was denied to our parent
container, just continue.

Cgmanager does not help us to distinguish between eperm and other
errors, so just always continue.

We may want to consider actually computing the range of devices
to which the container monitor has access, but OTOH that introduces
a whole new set of complexity to compute access sets.

Closes #827

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #826 from brauner/2016-02-19/exec_cast_null
Serge Hallyn [Fri, 19 Feb 2016 19:00:59 +0000 (11:00 -0800)] 
Merge pull request #826 from brauner/2016-02-19/exec_cast_null

cast NULL pointers passed to execl*()

9 years agocast NULL pointers passed to execl*() 826/head
Christian Brauner [Fri, 19 Feb 2016 11:44:40 +0000 (12:44 +0100)] 
cast NULL pointers passed to execl*()

NULL pointers passed to execl*() functions must be cast to (char *)NULL since
they are variadic functions.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agochange version to 2.0.0.rc1 in configure.ac lxc-2.0.0.rc1
Stéphane Graber [Thu, 18 Feb 2016 17:20:43 +0000 (12:20 -0500)] 
change version to 2.0.0.rc1 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #823 from stgraber/master
Christian Brauner [Tue, 16 Feb 2016 07:01:25 +0000 (08:01 +0100)] 
Merge pull request #823 from stgraber/master

Fix doc build warnings

9 years agoFix doc build warnings 823/head
Stéphane Graber [Tue, 16 Feb 2016 06:16:33 +0000 (01:16 -0500)] 
Fix doc build warnings

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #822 from stgraber/master
Serge Hallyn [Tue, 16 Feb 2016 02:49:22 +0000 (18:49 -0800)] 
Merge pull request #822 from stgraber/master

Couple of apparmor tweaks

9 years agoAllow cgroupfs remount by systemd 822/head
Stéphane Graber [Tue, 16 Feb 2016 01:08:09 +0000 (20:08 -0500)] 
Allow cgroupfs remount by systemd

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoAllow sysfs remount by mountall
Stéphane Graber [Tue, 16 Feb 2016 01:03:50 +0000 (20:03 -0500)] 
Allow sysfs remount by mountall

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #821 from hallyn/2016-02-15/lognull
Christian Brauner [Mon, 15 Feb 2016 20:38:00 +0000 (21:38 +0100)] 
Merge pull request #821 from hallyn/2016-02-15/lognull

2016 02 15/lognull

9 years agolog.c:__lxc_log_set_file: completely close log file when overriding 821/head
Serge Hallyn [Mon, 15 Feb 2016 20:18:18 +0000 (12:18 -0800)] 
log.c:__lxc_log_set_file: completely close log file when overriding

Otherwise after a shortcut on error we could end up trying to write
to the closed log fd.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agolog.c:__lxc_log_set_file: fname cannot be null
Serge Hallyn [Mon, 15 Feb 2016 20:15:10 +0000 (12:15 -0800)] 
log.c:__lxc_log_set_file: fname cannot be null

fname cannot be passed in as NULL by any of its current callers.  If it
could, then build_dir() would crash as it doesn't check for it.  So make
sure we are warned if in the future we pass in NULL.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #813 from brauner/2016-02-01/lxc_destroy_ephemeral
Serge Hallyn [Wed, 10 Feb 2016 18:34:49 +0000 (10:34 -0800)] 
Merge pull request #813 from brauner/2016-02-01/lxc_destroy_ephemeral

lxc-destroy: deal with ephemeral containers

9 years agolxc-destroy: deal with ephemeral containers 813/head
Christian Brauner [Wed, 10 Feb 2016 01:32:37 +0000 (02:32 +0100)] 
lxc-destroy: deal with ephemeral containers

- Ephemeral containers are destroyed on shutdown so we do not destroy them.
- Destroy ephemeral containers with clones: first destroy all the clones, then
  destroy the container.
- Ephemeral containers with snapshots cannot be easily handled but we can
  probably trust that no one will try to make snapshots of an ephemeral
  container.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #812 from brauner/2016-02-10/quiet_lxc_copy
Serge Hallyn [Wed, 10 Feb 2016 01:00:42 +0000 (17:00 -0800)] 
Merge pull request #812 from brauner/2016-02-10/quiet_lxc_copy

silence lxc-copy as well when asked

9 years agosilence lxc-copy as well when asked 812/head
Christian Brauner [Wed, 10 Feb 2016 00:22:15 +0000 (01:22 +0100)] 
silence lxc-copy as well when asked

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #811 from hallyn/2016-02-09/destroyquiet
Christian Brauner [Wed, 10 Feb 2016 00:25:04 +0000 (01:25 +0100)] 
Merge pull request #811 from hallyn/2016-02-09/destroyquiet

lxc_destroy: be quiet if asked

9 years agolxc_destroy: be quiet if asked 811/head
Serge Hallyn [Wed, 10 Feb 2016 00:07:32 +0000 (16:07 -0800)] 
lxc_destroy: be quiet if asked

As per https://bugs.launchpad.net/bugs/1543016.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #808 from hallyn/2016-02-07/aa.2
Christian Brauner [Mon, 8 Feb 2016 21:27:05 +0000 (22:27 +0100)] 
Merge pull request #808 from hallyn/2016-02-07/aa.2

apparmor: don't fail if current aa label is given

9 years agoapparmor: don't fail if current aa label is given 808/head
Serge Hallyn [Mon, 8 Feb 2016 07:06:10 +0000 (23:06 -0800)] 
apparmor: don't fail if current aa label is given

Ideally a container configuration will specify 'unchanged' if
it wants the container to use the current (parent) profile.  But
lxd passes its current label.  Support that too.

Note that if/when stackable profiles exist, this behavior may
or may not be what we want.  But the code to deal with aa
stacking will need some changes anyway so this is ok.

With this patch, I can create nested containers inside a
lxd xenial container both using

lxc launch x2

and unprivileged

lxc-start -n x2

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #805 from benaryorg/patch-1
Stéphane Graber [Fri, 5 Feb 2016 20:49:13 +0000 (21:49 +0100)] 
Merge pull request #805 from benaryorg/patch-1

fix typo

9 years agofix typo 805/head
Katze [Fri, 5 Feb 2016 17:53:59 +0000 (18:53 +0100)] 
fix typo

Signed-off-by: benaryorg <binary@benary.org>
9 years agoMerge pull request #801 from brauner/2016-02-03/automatic_overlay_for_containers_with...
Serge Hallyn [Thu, 4 Feb 2016 17:41:31 +0000 (09:41 -0800)] 
Merge pull request #801 from brauner/2016-02-03/automatic_overlay_for_containers_without_rootfs

allow overlay lxc.mount.entry with no rootfs

9 years agoallow overlay lxc.mount.entry with no rootfs 801/head
Christian Brauner [Wed, 3 Feb 2016 19:07:57 +0000 (20:07 +0100)] 
allow overlay lxc.mount.entry with no rootfs

Allow lxc.mount.entry entries for containers without a rootfs.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #798 from hallyn/2016-02-02/commentrootfs
Christian Brauner [Thu, 4 Feb 2016 08:20:53 +0000 (08:20 +0000)] 
Merge pull request #798 from hallyn/2016-02-02/commentrootfs

Comment the lxc_rootfs structure

9 years agoComment the lxc_rootfs structure 798/head
Serge Hallyn [Wed, 3 Feb 2016 03:20:05 +0000 (19:20 -0800)] 
Comment the lxc_rootfs structure

Comment rootfs.path and rootfs.mount so people can better figure
out which to use.

Remove the unused pivotdir argument from setup_rootfs_pivot_root().
Remove the unused pivot member of the lxc_rootfs struct.  And just
return 0 (success) when someone passes a lxc.pivotdir entry.  One
day we'll turn that into an error, but not yet...

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #803 from tych0/add-fuse-kernel-config-check
Stéphane Graber [Thu, 4 Feb 2016 00:10:44 +0000 (01:10 +0100)] 
Merge pull request #803 from tych0/add-fuse-kernel-config-check

lxc-checkconfig: warn about fuse as well

9 years agolxc-checkconfig: warn about fuse as well 803/head
Tycho Andersen [Wed, 3 Feb 2016 19:30:03 +0000 (12:30 -0700)] 
lxc-checkconfig: warn about fuse as well

Since we need fuse to run lxcfs, which is required by systemd, let's warn
about that as well.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
9 years agoMerge pull request #800 from brauner/2016-02-03/no_rootfs_implies_abspath
Serge Hallyn [Wed, 3 Feb 2016 17:49:19 +0000 (09:49 -0800)] 
Merge pull request #800 from brauner/2016-02-03/no_rootfs_implies_abspath

no rootfs => mounts always relative to host's /

9 years agono rootfs => mounts are always relative to hosts / 800/head
Christian Brauner [Wed, 3 Feb 2016 12:17:51 +0000 (13:17 +0100)] 
no rootfs => mounts are always relative to hosts /

All lxc.mount.entry entries will be relative to the hosts / when a container
does not specify a lxc.rootfs.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #799 from brauner/2016-02-03/aufs_mkdir_to_lxcaufs
Serge Hallyn [Wed, 3 Feb 2016 17:42:36 +0000 (09:42 -0800)] 
Merge pull request #799 from brauner/2016-02-03/aufs_mkdir_to_lxcaufs

move and rename mount_entry_create_aufs_dirs()

9 years agomove and rename mount_entry_create_aufs_dirs() 799/head
Christian Brauner [Tue, 2 Feb 2016 23:41:14 +0000 (00:41 +0100)] 
move and rename mount_entry_create_aufs_dirs()

- The function mount_entry_create_aufs_dirs() moves from conf.c to
  lxcaufs.{c,h} where it belongs.
- In accordance with the "aufs_" prefix naming scheme for functions associated
  with lxcaufs.{c,h} mount_entry_create_aufs_dirs() becomes aufs_mkdir().
- Add aufs_get_rootfs() which returns the rootfs for an aufs lxc.rootfs.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #797 from brauner/2016-02-02/fix_execute_null_ptr_deref
Serge Hallyn [Wed, 3 Feb 2016 04:32:26 +0000 (20:32 -0800)] 
Merge pull request #797 from brauner/2016-02-02/fix_execute_null_ptr_deref

Fix mount_entry_on_generic()

9 years agoFix mount_entry_on_generic() 797/head
Christian Brauner [Tue, 2 Feb 2016 21:13:07 +0000 (22:13 +0100)] 
Fix mount_entry_on_generic()

In mount_entry_on_generic() we dereferenced a NULL pointer whenever a container
without a rootfs was created. (Since mount_entry_on_systemfs() passes them with
NULL.) We have mount_entry_on_generic() check whether rootfs != NULL.

We also check whether rootfs != NULL in the functions ovl_mkdir() and
mount_entry_create_aufs_dirs() and bail immediately. Rationale: For overlay and
aufs lxc.mount.entry entries users give us absolute paths to e.g. workdir and
upperdir which we create for them. We currently use rootfs->path and the
lxcpath for the container to check that users give us a sane path to create
those directories under and refuse if they do not. If we want to allow overlay
mounts for containers without a rootfs they can easily be reworked.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #796 from brauner/2016-02-02/fix_execute_null_ptr_deref
Stéphane Graber [Tue, 2 Feb 2016 14:20:27 +0000 (15:20 +0100)] 
Merge pull request #796 from brauner/2016-02-02/fix_execute_null_ptr_deref

Fix NULL-ptr derefs for container without rootfs

9 years agoFix NULL-ptr derefs for container without rootfs 796/head
Christian Brauner [Tue, 2 Feb 2016 13:43:33 +0000 (14:43 +0100)] 
Fix NULL-ptr derefs for container without rootfs

Since we allow containers to be created without a rootfs most checks in conf.c
are not sane anymore. Instead of just checking if rootfs->path != NULL we need
to check whether rootfs != NULL.

Minor fixes:
- Have mount_autodev() always return -1 on failure: mount_autodev() returns 0
  on success and -1 on failure. But when the return value of safe_mount() was
  checked in mount_autodev() we returned false (instead of -1) which caused
  mount_autodev() to return 0 (success) instead of the correct -1 (failure).

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #795 from brauner/2016-02-02/lxc_ls_exit_zero
Stéphane Graber [Tue, 2 Feb 2016 12:21:11 +0000 (13:21 +0100)] 
Merge pull request #795 from brauner/2016-02-02/lxc_ls_exit_zero

lxc-ls: exit 0 when path is not found

9 years agolxc-ls: exit 0 when path is not found 795/head
Christian Brauner [Tue, 2 Feb 2016 11:06:29 +0000 (12:06 +0100)] 
lxc-ls: exit 0 when path is not found

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #793 from stgraber/master
Christian Brauner [Tue, 2 Feb 2016 11:45:30 +0000 (11:45 +0000)] 
Merge pull request #793 from stgraber/master

Remove legacy versions of lxc-ls

9 years agoFix typo 793/head
Stéphane Graber [Mon, 1 Feb 2016 16:57:00 +0000 (17:57 +0100)] 
Fix typo

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRemove legacy versions of lxc-ls
Stéphane Graber [Mon, 1 Feb 2016 16:37:24 +0000 (17:37 +0100)] 
Remove legacy versions of lxc-ls

lxc-ls nowadays is a C binary so there's no need to keep the python and
shell versions around anymore, remove them from the branch and cleanup
documentation and Makefiles.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #794 from Blub/next
Christian Brauner [Tue, 2 Feb 2016 11:06:03 +0000 (11:06 +0000)] 
Merge pull request #794 from Blub/next

apparmor: allow binding /run/{,lock/} -> /var/run/{,lock/}

9 years agoapparmor: allow binding /run/{,lock/} -> /var/run/{,lock/} 794/head
Wolfgang Bumiller [Tue, 2 Feb 2016 08:13:04 +0000 (09:13 +0100)] 
apparmor: allow binding /run/{,lock/} -> /var/run/{,lock/}

Some systems need to be able to bind-mount /run to /var/run
and /run/lock to /var/run/lock. (Tested with opensuse 13.1
containers migrated from openvz.)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 years agoMerge pull request #787 from ysbnim/master
Stéphane Graber [Mon, 1 Feb 2016 13:04:39 +0000 (14:04 +0100)] 
Merge pull request #787 from ysbnim/master

Update Korean manpages

9 years agogitignore doc/ko/legacy/*.1 787/head
Sungbae Yoo [Mon, 1 Feb 2016 11:55:30 +0000 (20:55 +0900)] 
gitignore doc/ko/legacy/*.1

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: update overlayfs and aufs in Japanese lxc.container.conf(5)
Sungbae Yoo [Mon, 1 Feb 2016 11:35:23 +0000 (20:35 +0900)] 
doc: update overlayfs and aufs in Japanese lxc.container.conf(5)

add the description of multiple lower layer.
Update for commit 280d237

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: Add network clear option to Korean lxc.container.conf(5)
Sungbae Yoo [Mon, 1 Feb 2016 11:11:09 +0000 (20:11 +0900)] 
doc: Add network clear option to Korean lxc.container.conf(5)

Update for commit 020104c

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: add clear behaviour of list options to Korean lxc.container.conf(5)
Sungbae Yoo [Mon, 1 Feb 2016 10:57:04 +0000 (19:57 +0900)] 
doc: add clear behaviour of list options to Korean lxc.container.conf(5)

Update for commit ff68914

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agochange version to 2.0.0.beta2 in configure.ac lxc-2.0.0.beta2
Stéphane Graber [Mon, 1 Feb 2016 11:09:20 +0000 (12:09 +0100)] 
change version to 2.0.0.beta2 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #786 from brauner/2016-01-31/lxc_copy_fix
Stéphane Graber [Mon, 1 Feb 2016 10:40:04 +0000 (11:40 +0100)] 
Merge pull request #786 from brauner/2016-01-31/lxc_copy_fix

lxc-copy: cleanup

9 years agoAlso move lxc-device in translated docs
Stéphane Graber [Mon, 1 Feb 2016 10:28:28 +0000 (11:28 +0100)] 
Also move lxc-device in translated docs

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: always enable lxc-device.1
Wolfgang Bumiller [Mon, 1 Feb 2016 10:18:59 +0000 (11:18 +0100)] 
doc: always enable lxc-device.1

Commit ea4679694 replaced the python implementation with a
C one.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agolxc-copy: cleanup 786/head
Christian Brauner [Thu, 28 Jan 2016 15:02:01 +0000 (16:02 +0100)] 
lxc-copy: cleanup

- make free_mnts() work directly on the globals mnt_table and mnt_table_size
- have free_mnts() set mnt_table = NULL and mnt_table_size = 0 when its done to
  avoid double frees
- simplify error-handling in do_clone_ephemeral()
- do_clone_ephemeral(): when chmod() falls to set permissions on the temporary
  folder we created for mkdtemp() remove the folder
- simplify error handling in main()

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agodoc: update overlayfs and aufs in Japanese lxc.container.conf(5)
KATOH Yasufumi [Mon, 1 Feb 2016 08:29:20 +0000 (17:29 +0900)] 
doc: update overlayfs and aufs in Japanese lxc.container.conf(5)

add the description of multiple lower layer.
Update for commit 280d237

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: Adapt manpage for Japanese lxc-ls to new C implementation
KATOH Yasufumi [Mon, 1 Feb 2016 08:29:19 +0000 (17:29 +0900)] 
doc: Adapt manpage for Japanese lxc-ls to new C implementation

Update for commit 37cf83e

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: Add network clear option to Japanese lxc.container.conf(5)
KATOH Yasufumi [Mon, 1 Feb 2016 08:29:18 +0000 (17:29 +0900)] 
doc: Add network clear option to Japanese lxc.container.conf(5)

Update for commit 020104c

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: add clear behaviour of list options to Japanese lxc.container.conf(5)
KATOH Yasufumi [Mon, 1 Feb 2016 08:29:17 +0000 (17:29 +0900)] 
doc: add clear behaviour of list options to Japanese lxc.container.conf(5)

Update for commit ff68914

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #785 from hallyn/2016-01-31/cgfs
Stéphane Graber [Sun, 31 Jan 2016 16:56:26 +0000 (17:56 +0100)] 
Merge pull request #785 from hallyn/2016-01-31/cgfs

2016 01 31/cgfs

9 years agocgfs: prune the init scope from paths 785/head
Serge Hallyn [Sun, 31 Jan 2016 15:34:54 +0000 (16:34 +0100)] 
cgfs: prune the init scope from paths

Just as cgmanager does, if we are calculating a task's paths, drop
the trailing '/init.scope'.  We don't want the container to sit under
there.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocgfs: always handle named subsystems by default
Serge Hallyn [Sun, 31 Jan 2016 15:33:30 +0000 (16:33 +0100)] 
cgfs: always handle named subsystems by default

Previously, name= controllers would be handled if lxc.cgroup.use=@all,
but not if lxc.cgroup.use was unspecified.  Change that, since you cannot
run systemd in a container without it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoFix syntax error in ko/lxc-ls.sgml.in
Stéphane Graber [Sun, 31 Jan 2016 11:15:59 +0000 (12:15 +0100)] 
Fix syntax error in ko/lxc-ls.sgml.in

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: Adapt manpage for Korean lxc-ls to new C implementation
Sungbae Yoo [Fri, 29 Jan 2016 09:29:34 +0000 (09:29 +0000)] 
doc: Adapt manpage for Korean lxc-ls to new C implementation

Update for commit 37cf83e

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: Add valueless lxc.cap.drop behaviour to Korean man page
Sungbae Yoo [Fri, 29 Jan 2016 09:28:36 +0000 (09:28 +0000)] 
doc: Add valueless lxc.cap.drop behaviour to Korean man page

Update for commit 7eff30f

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agodoc: Add lxc-copy to Korean/Japanese see_also.sgml.in
Sungbae Yoo [Fri, 29 Jan 2016 09:27:13 +0000 (09:27 +0000)] 
doc: Add lxc-copy to Korean/Japanese see_also.sgml.in

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRemove wrong command line arg from help output
Christian Brauner [Thu, 28 Jan 2016 14:24:01 +0000 (15:24 +0100)] 
Remove wrong command line arg from help output

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #780 from hallyn/2016-01-29/chown
Stéphane Graber [Sat, 30 Jan 2016 00:26:32 +0000 (01:26 +0100)] 
Merge pull request #780 from hallyn/2016-01-29/chown

implement chown for cgfs

9 years agoMerge pull request #784 from mingewang/master
Stéphane Graber [Sat, 30 Jan 2016 00:25:33 +0000 (01:25 +0100)] 
Merge pull request #784 from mingewang/master

increase /dev size to 500k ( issue #781)

9 years agoincrease /dev size to 500k ( issue #781) 784/head
Min Wang [Fri, 29 Jan 2016 20:40:28 +0000 (15:40 -0500)] 
increase /dev size to 500k ( issue #781)

Signed-off-by: Min Wang <mingewang@gmail.com>
9 years agoMerge pull request #777 from hallyn/2016-01-28/cgns1
Stéphane Graber [Fri, 29 Jan 2016 17:13:32 +0000 (18:13 +0100)] 
Merge pull request #777 from hallyn/2016-01-28/cgns1

cgroup ns: move the check for whether cgns is supported

9 years agoimplement chown for cgfs 780/head
Serge Hallyn [Fri, 29 Jan 2016 09:03:27 +0000 (10:03 +0100)] 
implement chown for cgfs

This allows cgfs to be used to create containers in a user namespace,
and have the container owner be able to use cgroups.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #768 from clopez/ignore_git_directories
Stéphane Graber [Fri, 29 Jan 2016 16:16:36 +0000 (17:16 +0100)] 
Merge pull request #768 from clopez/ignore_git_directories

Ignore any container named '.git'

9 years agoIgnore any container with a name starting by '.' 768/head
Carlos Alberto Lopez Perez [Fri, 29 Jan 2016 14:39:22 +0000 (15:39 +0100)] 
Ignore any container with a name starting by '.'

  * This are either '.', '..' or a hidden directory.
    And this names should not be used for a container
    in any case.

  * Before this patch, if you created a git repository under lxc.lxcpath (it
    can be useful to keep track of the configurations of your containers)

    Then, when you run lxc-ls you will get the following output:

        # lxc-ls
        .git      container1      container2    ....

    This is because there is a 'config' file inside the '.git' directory.
    It is where git stores the configuration of the repository.

    And the test lxc-ls does to check if a directory contains a container
    is just to check if the 'directory/config' file exists.

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
9 years agoAdd SOCK_CLOEXEC define for Android
Stéphane Graber [Fri, 29 Jan 2016 12:35:47 +0000 (13:35 +0100)] 
Add SOCK_CLOEXEC define for Android

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #779 from hiraku/fix-centos-template-uppercase
Stéphane Graber [Fri, 29 Jan 2016 09:09:49 +0000 (10:09 +0100)] 
Merge pull request #779 from hiraku/fix-centos-template-uppercase

Use ${utsname} instead of ${UTSNAME} because latter variable is not defined