]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
6 years agotools: document -d/--daemonize for lxc-execute
Christian Brauner [Sun, 15 Apr 2018 20:42:43 +0000 (22:42 +0200)]
tools: document -d/--daemonize for lxc-execute

Closes #2280.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoseccomp: improve logging
Christian Brauner [Sun, 15 Apr 2018 20:39:07 +0000 (22:39 +0200)]
seccomp: improve logging

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoseccomp: cleanup compat architecture handling
Christian Brauner [Sun, 15 Apr 2018 20:12:51 +0000 (22:12 +0200)]
seccomp: cleanup compat architecture handling

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2275 from brauner/2018-04-13/improve_seccomp
Stéphane Graber [Fri, 13 Apr 2018 16:20:33 +0000 (18:20 +0200)]
Merge pull request #2275 from brauner/2018-04-13/improve_seccomp

seccomp: handle all errors

6 years agoseccomp: handle all errors
Christian Brauner [Fri, 13 Apr 2018 16:00:23 +0000 (18:00 +0200)]
seccomp: handle all errors

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2274 from brauner/2018-04-13/fix_seccomp_with_personality_and_64b...
Serge Hallyn [Fri, 13 Apr 2018 15:29:18 +0000 (10:29 -0500)]
Merge pull request #2274 from brauner/2018-04-13/fix_seccomp_with_personality_and_64bit_kernel_32_bit_userspace

seccomp: handle arch inversion

6 years agoseccomp: handle arch inversion
Christian Brauner [Fri, 13 Apr 2018 12:02:24 +0000 (14:02 +0200)]
seccomp: handle arch inversion

This commit deals with different kernel and userspace layouts and nesting. Here
are three examples:
1. 64bit kernel and 64bit userspace running 32bit containers
2. 64bit kernel and 32bit userspace running 64bit containers
3. 64bit kernel and 64bit userspace running 32bit containers running 64bit containers
Two things to lookout for:
1. The compat arch that is detected might have already been present in the main
   context. So check that it actually hasn't been and only then add it.
2. The contexts don't need merging if the architectures are the same and also can't be.
With these changes I can run all crazy/weird combinations with proper seccomp
isolation.

Closes #654.

Link: https://bugs.chromium.org/p/chromium/issues/detail?id=832366
Reported-by: Chirantan Ekbote <chirantan@chromium.org>
Reported-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2273 from aither64/master
Christian Brauner [Fri, 13 Apr 2018 08:39:05 +0000 (10:39 +0200)]
Merge pull request #2273 from aither64/master

conf: fix net type checks in run_script_argv()

6 years agoconf: fix net type checks in run_script_argv()
Jakub Skokan [Thu, 12 Apr 2018 18:01:43 +0000 (20:01 +0200)]
conf: fix net type checks in run_script_argv()

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
6 years agoMerge pull request #2272 from brauner/2018-04-12/bugfixes
Serge Hallyn [Thu, 12 Apr 2018 16:31:05 +0000 (11:31 -0500)]
Merge pull request #2272 from brauner/2018-04-12/bugfixes

conf: ret-try devpts mount without gid=5 on error

6 years agoexecute: fix app containers without root mapping
Christian Brauner [Thu, 12 Apr 2018 10:49:20 +0000 (12:49 +0200)]
execute: fix app containers without root mapping

When starting application containers without a mapping for container root are
started, a dummy bind-mount target for lxc-init needs to be created. This will
not always work directly under "/" when e.g. permissions are missing due to the
ownership and/or mode of "/". We can try to work around this by using the
P_tmpdir as defined in POSIX which should usually land us in /tmp where
basically everyone can create files.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: ret-try devpts mount without gid=5 on error
Christian Brauner [Thu, 12 Apr 2018 09:12:06 +0000 (11:12 +0200)]
conf: ret-try devpts mount without gid=5 on error

We should always default to mounting devpts with gid=5 but we should fallback
to mounting without gid=5. This let's us cover use-cases such as container
started with only a single mapping e.g.:

lxc.idmap = u 1000 1000 1
lxc.idmap = g 1000 1000 1

Closes #2257.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2270 from brauner/2018-04-11/attach_try_dropping_supplementary_groups
Serge Hallyn [Wed, 11 Apr 2018 23:00:35 +0000 (18:00 -0500)]
Merge pull request #2270 from brauner/2018-04-11/attach_try_dropping_supplementary_groups

attach: try to always drop supplementary groups

6 years agoMerge pull request #2259 from gjaekel/patch-1
Serge Hallyn [Wed, 11 Apr 2018 17:24:59 +0000 (12:24 -0500)]
Merge pull request #2259 from gjaekel/patch-1

rootfs pinning: On NFS, make file hidden but don't delete it

6 years agoattach: try to always drop supplementary groups
Christian Brauner [Wed, 11 Apr 2018 15:35:57 +0000 (17:35 +0200)]
attach: try to always drop supplementary groups

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2266 from brauner/2018-04-09/attach_drop_suppl_groups
Stéphane Graber [Tue, 10 Apr 2018 12:14:34 +0000 (14:14 +0200)]
Merge pull request #2266 from brauner/2018-04-09/attach_drop_suppl_groups

attach: always drop supplementary groups

6 years agoutils: define __NR_setns if missing on old glibcs
Christian Brauner [Tue, 10 Apr 2018 10:27:39 +0000 (12:27 +0200)]
utils: define __NR_setns if missing on old glibcs

Closes #2248.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2267 from brauner/QbitLogic-master
Christian Brauner [Mon, 9 Apr 2018 19:00:36 +0000 (21:00 +0200)]
Merge pull request #2267 from brauner/QbitLogic-master

Mergeable branch for C0deAi fixes

6 years agolxc init: coding style
Christian Brauner [Mon, 9 Apr 2018 18:44:14 +0000 (20:44 +0200)]
lxc init: coding style

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agotools/utils: free memory on error
C0deAi [Fri, 6 Apr 2018 16:56:50 +0000 (12:56 -0400)]
tools/utils: free memory on error

Closes #2262.

Signed-off-by: C0deAi <techsupport@mycode.ai>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agostorage/rsync: free memory on error
C0deAi [Fri, 6 Apr 2018 16:46:53 +0000 (12:46 -0400)]
storage/rsync: free memory on error

Closes #2262.

Signed-off-by: C0deAi <techsupport@mycode.ai>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxc init: remove dead code
C0deAi [Fri, 6 Apr 2018 15:30:06 +0000 (11:30 -0400)]
lxc init: remove dead code

Value stored is never read.

Closes #2262.

Signed-off-by: C0deAi <techsupport@mycode.ai>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoattach: always drop supplementary groups
Christian Brauner [Mon, 9 Apr 2018 16:01:38 +0000 (18:01 +0200)]
attach: always drop supplementary groups

Closes #1704.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2263 from ffontaine/master
Christian Brauner [Mon, 9 Apr 2018 08:15:09 +0000 (10:15 +0200)]
Merge pull request #2263 from ffontaine/master

Fix compilation with static libcap and shared gnutls

6 years agoFix compilation with static libcap and shared gnutls
Fabrice Fontaine [Sat, 7 Apr 2018 13:48:46 +0000 (15:48 +0200)]
Fix compilation with static libcap and shared gnutls

Commit c06ed219c47098f34485d408410b6ecc94a40877 has broken
compilation with a static libcap and a shared gnutls.
This results in a build failure on init_lxc_static if gnutls is
a shared library as init_lxc_static is built with -all-static option
(see src/lxc/Makefile.am) and AC_CHECK_LIB adds gnutls to LIBS.

This commit fix the issue by removing default behavior of AC_CHECK_LIB
and handling manually GNUTLS_LIBS and HAVE_LIBGNUTLS

Fixes:
 - http://autobuild.buildroot.net/results/b655d6853c25a195df28d91512b3ffb6c654fc90

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
6 years agoMerge pull request #2261 from brauner/2018-04-06/thmo_patch_1
Christian Brauner [Fri, 6 Apr 2018 14:24:25 +0000 (16:24 +0200)]
Merge pull request #2261 from brauner/2018-04-06/thmo_patch_1

Fix temp file creation

6 years agoringbuf: fix temporary file creation
Christian Brauner [Fri, 6 Apr 2018 08:54:41 +0000 (10:54 +0200)]
ringbuf: fix temporary file creation

lxc_make_tmpfile() uses mkstemp() internally, and thus expects the
template to contain 'XXXXXX' and be writable.

Signed-off-by: Thomas Moschny <thomas.moschny@gmx.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: fix temporary file creation
Christian Brauner [Fri, 6 Apr 2018 08:54:02 +0000 (10:54 +0200)]
conf: fix temporary file creation

lxc_make_tmpfile() uses mkstemp() internally, and thus expects the
template to contain 'XXXXXX' and be writable.

Signed-off-by: Thomas Moschny <thomas.moschny@gmx.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agorootfs pinning: On NFS, make file hidden but don't delete it
Guido Jäkel [Fri, 6 Apr 2018 07:35:21 +0000 (09:35 +0200)]
rootfs pinning: On NFS, make file hidden but don't delete it

On NFS, avoid random names of the root pin file due to "NFS silly renaming" but use a fixed hidden name instead.

6 years agoMerge pull request #2258 from tych0/fix-signal-sending-to-lxc-init
Serge Hallyn [Thu, 5 Apr 2018 21:03:44 +0000 (16:03 -0500)]
Merge pull request #2258 from tych0/fix-signal-sending-to-lxc-init

fix signal sending in lxc.init

6 years agofix signal sending in lxc.init
Tycho Andersen [Wed, 4 Apr 2018 23:45:29 +0000 (17:45 -0600)]
fix signal sending in lxc.init

The problem here is that these two clauses were ordered backwards: we first
check if the signal came from not the init pid, and if it did, then we give
a notice and return. The comment notes that this is intended to protect
against SIGCHLD, but we don't in fact know if the signal is a SIGCHLD yet,
because that's tested in the next hunk.

The symptom is that if I e.g. send SIGTERM from the outside world to the
container init, it ignores it and gives this notice. If we re-order these
clauses, it forwards non SIGCHLD signals, and ignores SIGCHLD signals from
things that aren't the real container process.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoMerge pull request #2256 from tenforward/japanese
Christian Brauner [Tue, 3 Apr 2018 13:00:08 +0000 (15:00 +0200)]
Merge pull request #2256 from tenforward/japanese

doc: Tweak Japanese translation in lxc.container.conf(5)

6 years agodoc: Tweak Japanese translation in lxc.container.conf(5)
KATOH Yasufumi [Tue, 3 Apr 2018 12:29:09 +0000 (21:29 +0900)]
doc: Tweak Japanese translation in lxc.container.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
6 years agoMerge branch 'FengtuWang-make_rslave' into lxc/master
Christian Brauner [Mon, 2 Apr 2018 13:58:06 +0000 (15:58 +0200)]
Merge branch 'FengtuWang-make_rslave' into lxc/master

6 years agoconf: ensure umounts don't propagate to host
Fengtu Wang [Mon, 2 Apr 2018 21:00:19 +0000 (05:00 +0800)]
conf: ensure umounts don't propagate to host

Signed-off-by: Fengtu Wang <wangfengtu@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2247 from brauner/2018-03-31/expand_lxc_environment
Stéphane Graber [Mon, 2 Apr 2018 05:08:39 +0000 (01:08 -0400)]
Merge pull request #2247 from brauner/2018-03-31/expand_lxc_environment

confile: expand lxc.environment

6 years agoconfile: expand lxc.environment
Christian Brauner [Sat, 31 Mar 2018 00:39:28 +0000 (02:39 +0200)]
confile: expand lxc.environment

When a bare environment variable is specified then retrieve the value from the
current environment. For example, setting

lxc.environment = PATH

will cause LXC to inherit the value of PATH from the current environment.

Suggested-by: Jonathan Calmels <jcalmels@nvidia.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2244 from brauner/2018-03-29/fixup
Stéphane Graber [Fri, 30 Mar 2018 15:29:56 +0000 (11:29 -0400)]
Merge pull request #2244 from brauner/2018-03-29/fixup

bugfixes

6 years agolocktests: fix test suite
Christian Brauner [Fri, 30 Mar 2018 05:53:02 +0000 (07:53 +0200)]
locktests: fix test suite

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxclock: use thread-safe *_OFD_* fcntl() locks
Christian Brauner [Fri, 30 Mar 2018 04:54:40 +0000 (06:54 +0200)]
lxclock: use thread-safe *_OFD_* fcntl() locks

If they aren't available fallback to BSD flock()s.

Closes #2245.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2246 from flx42/lxc-oci-cmd-parsing-and-umoci
Christian Brauner [Thu, 29 Mar 2018 19:31:54 +0000 (12:31 -0700)]
Merge pull request #2246 from flx42/lxc-oci-cmd-parsing-and-umoci

lxc-oci: cmd parsing and less verbose umoci

6 years agolxc-oci: make umoci less verbose
Felix Abecassis [Thu, 29 Mar 2018 17:21:22 +0000 (10:21 -0700)]
lxc-oci: make umoci less verbose

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agolxc-oci: fix Cmd/Entrypoint parsing
Felix Abecassis [Thu, 29 Mar 2018 17:20:31 +0000 (10:20 -0700)]
lxc-oci: fix Cmd/Entrypoint parsing

Don't use the -r option of jq, since it will strip the double quotes.

Fixes: #2195
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agostorage: fix lvm fs uuid generation
Christian Brauner [Thu, 29 Mar 2018 16:29:49 +0000 (18:29 +0200)]
storage: fix lvm fs uuid generation

Closes #2241.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agotools: fix unitialized variable
Christian Brauner [Thu, 29 Mar 2018 16:20:35 +0000 (18:20 +0200)]
tools: fix unitialized variable

Closes #2242.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoRelease LXC 3.0.0 lxc-3.0.0
Stéphane Graber [Wed, 28 Mar 2018 01:49:16 +0000 (21:49 -0400)]
Release LXC 3.0.0

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoMerge pull request #2239 from brauner/2018-03-27/fixup_action_script
Stéphane Graber [Tue, 27 Mar 2018 20:49:34 +0000 (16:49 -0400)]
Merge pull request #2239 from brauner/2018-03-27/fixup_action_script

Allow passing action scripts to CRIU

6 years agoAllow passing action scripts to CRIU
Eytan Heidingsfeld [Sun, 25 Mar 2018 21:10:21 +0000 (21:10 +0000)]
Allow passing action scripts to CRIU

Closes #2236.

Signed-off-by: Eytan Heidingsfeld <eytanh@gmail.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2238 from stgraber/master
Christian Brauner [Tue, 27 Mar 2018 20:02:33 +0000 (13:02 -0700)]
Merge pull request #2238 from stgraber/master

configure.ac: Support redhatenterpriseserver

6 years agoconfigure.ac: Support redhatenterpriseserver
Stéphane Graber [Tue, 27 Mar 2018 19:21:51 +0000 (15:21 -0400)]
configure.ac: Support redhatenterpriseserver

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoRelease LXC 3.0.0.beta4
Stéphane Graber [Tue, 27 Mar 2018 03:38:01 +0000 (23:38 -0400)]
Release LXC 3.0.0.beta4

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoMerge pull request #2237 from brauner/2018-03-26/always_make_dumpable
Stéphane Graber [Mon, 26 Mar 2018 22:11:31 +0000 (18:11 -0400)]
Merge pull request #2237 from brauner/2018-03-26/always_make_dumpable

start: always make us dumpable

6 years agostart: always make us dumpable
Christian Brauner [Mon, 26 Mar 2018 21:03:28 +0000 (23:03 +0200)]
start: always make us dumpable

Otherwise lxc.hook.mount hooks that try to inspect /proc/<pid>/*
will fail.

Cc: Jonathan Calmels <jcalmels@nvidia.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2235 from brauner/2018-03-25/simplify_autodev
Stéphane Graber [Mon, 26 Mar 2018 02:30:58 +0000 (22:30 -0400)]
Merge pull request #2235 from brauner/2018-03-25/simplify_autodev

conf: simplify autodev

6 years agoconf: simplify lxc_fill_autodev()
Christian Brauner [Sun, 25 Mar 2018 12:33:44 +0000 (14:33 +0200)]
conf: simplify lxc_fill_autodev()

This function was way more syscall heavy than it needed to be.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2232 from flx42/dhclient-hook-apparmor
Stéphane Graber [Sat, 24 Mar 2018 04:36:32 +0000 (00:36 -0400)]
Merge pull request #2232 from flx42/dhclient-hook-apparmor

hooks: fix dhclient hook when an AppArmor profile is active

6 years agoRelease LXC 3.0.0.beta3
Stéphane Graber [Fri, 23 Mar 2018 20:22:00 +0000 (16:22 -0400)]
Release LXC 3.0.0.beta3

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoMerge pull request #2233 from brauner/2018-03-23/truncate_config_file
Stéphane Graber [Fri, 23 Mar 2018 19:44:52 +0000 (15:44 -0400)]
Merge pull request #2233 from brauner/2018-03-23/truncate_config_file

lxccontainer: truncate config file

6 years agolxccontainer: truncate config file
Christian Brauner [Fri, 23 Mar 2018 19:30:38 +0000 (20:30 +0100)]
lxccontainer: truncate config file

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2231 from stgraber/master
Christian Brauner [Fri, 23 Mar 2018 17:54:22 +0000 (18:54 +0100)]
Merge pull request #2231 from stgraber/master

pam: Fix missing symbols in module

6 years agohooks: fix dhclient hook when an AppArmor profile is active
Felix Abecassis [Fri, 23 Mar 2018 17:47:35 +0000 (10:47 -0700)]
hooks: fix dhclient hook when an AppArmor profile is active

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agopam: Fix missing symbols in module
Stéphane Graber [Fri, 23 Mar 2018 17:26:24 +0000 (13:26 -0400)]
pam: Fix missing symbols in module

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoMerge pull request #2229 from fliiiix/lxc_net_improvements
Stéphane Graber [Thu, 22 Mar 2018 16:35:43 +0000 (12:35 -0400)]
Merge pull request #2229 from fliiiix/lxc_net_improvements

Rename ifup/down and remove usless parameter passing

6 years agoMerge pull request #2230 from tych0/drop-log-whitespace
Christian Brauner [Thu, 22 Mar 2018 16:22:55 +0000 (17:22 +0100)]
Merge pull request #2230 from tych0/drop-log-whitespace

remove leading whitespace from log files

6 years agoRename ifup/down and remove usless parameter passing
fliiiix [Thu, 22 Mar 2018 15:18:59 +0000 (16:18 +0100)]
Rename ifup/down and remove usless parameter passing

Signed-off-by: Felix <de-ch@hotmail.de>
6 years agoremove leading whitespace from log files
Tycho Andersen [Thu, 22 Mar 2018 15:49:08 +0000 (09:49 -0600)]
remove leading whitespace from log files

This has annoyed me for a long time, 3.0 seems like the time to fix it :).

I think the way that the log prefix was intended to be used was perhaps a
dynamic prefix per file, but we don't do that today; we include the
filename later in the log message. Instead, we use it as the tool name,
which for liblxc is always "lxc", but could also be things like
"lxc-cgroup" or whatever. There is absolutely no reason to pad this, since
it is always the same for every log file (in fact, we could probably get
rid of the prefix all together, but that seems slightly more drastic).

Instead, let's just drop this padding. Hopefully this will save thousands
of hours of slight annoyance and right scrolling in various pastebins.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoMerge pull request #2225 from flx42/nvidia-hook-fixes
Christian Brauner [Mon, 19 Mar 2018 22:57:42 +0000 (23:57 +0100)]
Merge pull request #2225 from flx42/nvidia-hook-fixes

NVIDIA hook improvements

6 years agohooks: implement passthrough for latest features of libnvidia-container
Felix Abecassis [Mon, 19 Mar 2018 22:38:53 +0000 (15:38 -0700)]
hooks: implement passthrough for latest features of libnvidia-container

The "display" driver capability will expose /dev/nvidia-modeset:
https://github.com/NVIDIA/libnvidia-container/commit/9398d41d9f571578d6543703d287b014bcf1bb8c

The "--ldcache" argument allows overriding the location of the DSO cache:
https://github.com/NVIDIA/libnvidia-container/commit/41656bf9ed71448972f3254a10ceb3c53225a4e6

The "--root" argument allows nvidia-container-cli to execute in a different rootfs:
https://github.com/NVIDIA/libnvidia-container/commit/019fdc14e325eea55fbe0397a581bda9d0c4c5b1

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agohooks: fix nvidia hook when running under the lxc-start AppArmor profile
Felix Abecassis [Mon, 19 Mar 2018 18:38:06 +0000 (11:38 -0700)]
hooks: fix nvidia hook when running under the lxc-start AppArmor profile

For a reason that I don't understand, the profile transition needs to
be done on the current process. Changing the attributes for a
subsequent execve(2) (with /proc/self/attr/exec) will cause the kernel
to set AT_SECURE in the auxiliary vector and thus secure_getenv(3)
inside libnvidia-container will return NULL.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoRelease LXC 3.0.0.beta2
Stéphane Graber [Mon, 19 Mar 2018 20:05:53 +0000 (16:05 -0400)]
Release LXC 3.0.0.beta2

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoMerge pull request #2223 from flx42/fix-lxc-execute-use-after-free
Christian Brauner [Fri, 16 Mar 2018 22:16:22 +0000 (23:16 +0100)]
Merge pull request #2223 from flx42/fix-lxc-execute-use-after-free

tools: fix container use-after-free

6 years agotools: fix container use-after-free
Felix Abecassis [Fri, 16 Mar 2018 20:31:25 +0000 (13:31 -0700)]
tools: fix container use-after-free

Fields daemonize and error_num were being called after the
lxc_container_put.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoMerge pull request #2222 from tenforward/japanese
Christian Brauner [Fri, 16 Mar 2018 09:55:49 +0000 (10:55 +0100)]
Merge pull request #2222 from tenforward/japanese

doc: Remove aufs in Japanese man pages

6 years agodoc: Remove aufs in Japanese man pages
KATOH Yasufumi [Fri, 16 Mar 2018 09:40:14 +0000 (18:40 +0900)]
doc: Remove aufs in Japanese man pages

* and tweak English lxc-copy(1)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
6 years agoMerge pull request #2210 from brauner/2018-03-10/conf_cleanups
Serge Hallyn [Thu, 15 Mar 2018 17:00:37 +0000 (12:00 -0500)]
Merge pull request #2210 from brauner/2018-03-10/conf_cleanups

tree-wide: remove aufs storage driver

6 years agoterminal: s/Theh/The/
Christian Brauner [Mon, 12 Mar 2018 18:56:09 +0000 (19:56 +0100)]
terminal: s/Theh/The/

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: initialize pflags
Christian Brauner [Sun, 11 Mar 2018 10:33:30 +0000 (11:33 +0100)]
conf: initialize pflags

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: coding style changes
Christian Brauner [Sat, 10 Mar 2018 23:23:41 +0000 (00:23 +0100)]
conf: coding style changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agotree-wide: remove aufs storage driver
Christian Brauner [Sun, 11 Mar 2018 09:22:42 +0000 (10:22 +0100)]
tree-wide: remove aufs storage driver

We've announced quite a while back and printed out errors and warning everytime
someone used the aufs driver.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: order includes
Christian Brauner [Sat, 10 Mar 2018 22:40:59 +0000 (23:40 +0100)]
conf: order includes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2221 from tych0/fix-use-after-free
Christian Brauner [Thu, 15 Mar 2018 15:52:39 +0000 (16:52 +0100)]
Merge pull request #2221 from tych0/fix-use-after-free

fix handler use-after-free

6 years agofix handler use-after-free
Tycho Andersen [Thu, 15 Mar 2018 15:29:27 +0000 (15:29 +0000)]
fix handler use-after-free

The problem here is that __lxc_start frees the handler, so any use
afterwards is invalid. Since we don't have access to the actual struct
lxc_container object in __lxc_start, let's pass a pointer to error_num in
so it can be returned.

Unfortunately, I'm a little too paranoid to change the return type of
lxc_start, since it returns failure if some of the cleanup fails, which
may be useful in some cases. So let's keep this out of band.

Closes #2218
Closes #2219

Reported-by: Felix Abecassis <fabecassis@nvidia.com>
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoMerge pull request #2217 from flx42/fix-mount-hooks-double-call
Christian Brauner [Wed, 14 Mar 2018 23:37:17 +0000 (00:37 +0100)]
Merge pull request #2217 from flx42/fix-mount-hooks-double-call

conf: do not run the "mount" hooks twice

6 years agoconf: do not run the "mount" hooks twice
Felix Abecassis [Wed, 14 Mar 2018 23:20:18 +0000 (16:20 -0700)]
conf: do not run the "mount" hooks twice

Regression introduced by 8353b4c90ed18e570521134f2c60bef56a082b55

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoMerge pull request #2216 from igalic/fix/clang-warning
Christian Brauner [Wed, 14 Mar 2018 16:27:55 +0000 (17:27 +0100)]
Merge pull request #2216 from igalic/fix/clang-warning

conf: fix clang warning when building w/o libcap

6 years agoconf: fix clang warning when building w/o libcap
Igor Galić [Wed, 14 Mar 2018 15:53:24 +0000 (16:53 +0100)]
conf: fix clang warning when building w/o libcap

when compiling lxc with clang-5.0 parse_cap()'s main loop will produce a
warning about a tautological comparision (#2215).

By moving the result of computation into a variable (end) this is no
longer a constant expression. clang-5.0 does not do dataflow analysis at
this point, so it is, to quote someone from #llvm, "morally equivalent"
to casting `(int)i`.

in addition, we also clean up the #if HAVE_LIBCAP to no longer need
its #else branch!

Signed-off-by: Igor Galić <igor.galic@automatic-server.com>
6 years agoMerge pull request #2214 from flx42/fix-lxc-execute
Christian Brauner [Wed, 14 Mar 2018 05:31:54 +0000 (06:31 +0100)]
Merge pull request #2214 from flx42/fix-lxc-execute

tools: fix usage of boolean function set_config_item

6 years agotools: fix usage of boolean function set_config_item
Felix Abecassis [Wed, 14 Mar 2018 04:50:46 +0000 (21:50 -0700)]
tools: fix usage of boolean function set_config_item

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoMerge pull request #2213 from hallyn/2018-03-13/revert-cg
Christian Brauner [Tue, 13 Mar 2018 19:11:03 +0000 (20:11 +0100)]
Merge pull request #2213 from hallyn/2018-03-13/revert-cg

Revert "cgroups: don't escape if we're not real root"

6 years agoRevert "cgroups: don't escape if we're not real root"
Serge Hallyn [Tue, 13 Mar 2018 17:55:02 +0000 (12:55 -0500)]
Revert "cgroups: don't escape if we're not real root"

This reverts commit 8d961e28f1d759669b477a659cbb694aaa2af915.

Unfortunately I don't believe the check is correct in the general case.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
6 years agoMerge pull request #2212 from tych0/cgroup-escape-host-unpriv
Christian Brauner [Tue, 13 Mar 2018 16:14:15 +0000 (17:14 +0100)]
Merge pull request #2212 from tych0/cgroup-escape-host-unpriv

cgroups: don't escape if we're not real root

6 years agocgroups: don't escape if we're not real root
Tycho Andersen [Tue, 13 Mar 2018 15:57:10 +0000 (15:57 +0000)]
cgroups: don't escape if we're not real root

If we're host unpriv but root in our userns, we can't really escape
cgroups. Let's switch the cgroup escape test to reflect this.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoMerge pull request #2211 from tych0/usernsexec-init-log
Serge Hallyn [Mon, 12 Mar 2018 16:31:46 +0000 (11:31 -0500)]
Merge pull request #2211 from tych0/usernsexec-init-log

usernsexec: init log fd

6 years agousernsexec: init log fd
Tycho Andersen [Mon, 12 Mar 2018 15:39:37 +0000 (09:39 -0600)]
usernsexec: init log fd

lxc-usernsexec uses some functions (e.g. lxc_map_ids()), which are part of
the lxc library and thus use the WARN etc. macros to emit log messages.
However, it doesn't initialize the log in any way, so these messages go
into the ether.

lxc-usernsexec currently has no log parameters, so let's just log these to
stderr. Someone can do something fancier later if they want.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoMerge pull request #2209 from tenforward/fix_personality
Christian Brauner [Fri, 9 Mar 2018 09:42:24 +0000 (10:42 +0100)]
Merge pull request #2209 from tenforward/fix_personality

tools: Include config.h in tool_utils.c

6 years agotools: Include config.h in tool_utils.c
KATOH Yasufumi [Fri, 9 Mar 2018 08:53:09 +0000 (17:53 +0900)]
tools: Include config.h in tool_utils.c

Since we do not include config.h, personality is not set. This is fix
it. See issue #2208.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
6 years agoMerge pull request #2203 from flx42/fix-libcap-amzn1
Christian Brauner [Sat, 3 Mar 2018 06:33:18 +0000 (07:33 +0100)]
Merge pull request #2203 from flx42/fix-libcap-amzn1

Add a workaround for a build issue with old versions of libcap

6 years agoAdd a workaround for a build issue with old versions of libcap
Felix Abecassis [Sat, 3 Mar 2018 06:01:56 +0000 (22:01 -0800)]
Add a workaround for a build issue with old versions of libcap

Fixes: #2178
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoMerge pull request #2202 from brauner/2018-03-02/coding_style_update
Christian Brauner [Fri, 2 Mar 2018 12:01:13 +0000 (13:01 +0100)]
Merge pull request #2202 from brauner/2018-03-02/coding_style_update

CODING_STYLE: update

6 years agoCODING_STYLE: add languages to highlight
Christian Brauner [Fri, 2 Mar 2018 11:57:18 +0000 (12:57 +0100)]
CODING_STYLE: add languages to highlight

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>