Commit Graph

6799 Commits

Author SHA1 Message Date
Christian Brauner
96ec54acf8
attach: try to always drop supplementary groups
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-04-11 17:35:57 +02:00
Stéphane Graber
3d435963b7
Merge pull request #2266 from brauner/2018-04-09/attach_drop_suppl_groups
attach: always drop supplementary groups
2018-04-10 14:14:34 +02:00
Christian Brauner
9e320621fd
utils: define __NR_setns if missing on old glibcs
Closes #2248.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-04-10 12:27:39 +02:00
Christian Brauner
e456a1ef55
Merge pull request #2267 from brauner/QbitLogic-master
Mergeable branch for C0deAi fixes
2018-04-09 21:00:36 +02:00
Christian Brauner
d6d727aff1
lxc init: coding style
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-04-09 20:44:14 +02:00
C0deAi
74269047b4
tools/utils: free memory on error
Closes #2262.

Signed-off-by: C0deAi <techsupport@mycode.ai>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-04-09 20:40:13 +02:00
C0deAi
55d83a7c72
storage/rsync: free memory on error
Closes #2262.

Signed-off-by: C0deAi <techsupport@mycode.ai>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-04-09 20:40:09 +02:00
C0deAi
125a2e044c
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>
2018-04-09 20:40:02 +02:00
Christian Brauner
24927339bd
attach: always drop supplementary groups
Closes #1704.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-04-09 18:01:38 +02:00
Christian Brauner
4e256f6fe1
Merge pull request #2263 from ffontaine/master
Fix compilation with static libcap and shared gnutls
2018-04-09 10:15:09 +02:00
Fabrice Fontaine
49bc916b1d Fix compilation with static libcap and shared gnutls
Commit c06ed219c4 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>
2018-04-07 18:12:12 +02:00
Christian Brauner
5eda487c1c
Merge pull request #2261 from brauner/2018-04-06/thmo_patch_1
Fix temp file creation
2018-04-06 16:24:25 +02:00
Christian Brauner
709384a02e
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>
2018-04-06 10:54:41 +02:00
Christian Brauner
a324e7eba0
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>
2018-04-06 10:54:02 +02:00
Serge Hallyn
83ffaa1d39
Merge pull request #2258 from tych0/fix-signal-sending-to-lxc-init
fix signal sending in lxc.init
2018-04-05 16:03:44 -05:00
Tycho Andersen
9cb943843a 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>
2018-04-04 17:50:50 -06:00
Christian Brauner
22b2b9c87c
Merge pull request #2256 from tenforward/japanese
doc: Tweak Japanese translation in lxc.container.conf(5)
2018-04-03 15:00:08 +02:00
KATOH Yasufumi
09dd49ab20 doc: Tweak Japanese translation in lxc.container.conf(5)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2018-04-03 21:29:09 +09:00
Christian Brauner
94b437d17d
Merge branch 'FengtuWang-make_rslave' into lxc/master 2018-04-02 15:58:06 +02:00
Fengtu Wang
e599717bc5
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>
2018-04-02 15:56:40 +02:00
Stéphane Graber
0474e8a8e5
Merge pull request #2247 from brauner/2018-03-31/expand_lxc_environment
confile: expand lxc.environment
2018-04-02 01:08:39 -04:00
Christian Brauner
5eab47bce5
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>
2018-03-31 17:57:00 +02:00
Stéphane Graber
dae29309e3
Merge pull request #2244 from brauner/2018-03-29/fixup
bugfixes
2018-03-30 11:29:56 -04:00
Christian Brauner
59ecb672d0
locktests: fix test suite
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-30 07:53:02 +02:00
Christian Brauner
b19aabf5be
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>
2018-03-30 07:30:00 +02:00
Christian Brauner
68c084cbd9
Merge pull request #2246 from flx42/lxc-oci-cmd-parsing-and-umoci
lxc-oci: cmd parsing and less verbose umoci
2018-03-29 12:31:54 -07:00
Felix Abecassis
845ba283d6 lxc-oci: make umoci less verbose
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-29 10:21:22 -07:00
Felix Abecassis
d99e3b2ea7 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>
2018-03-29 10:20:31 -07:00
Christian Brauner
16c92537a5
storage: fix lvm fs uuid generation
Closes #2241.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-29 18:29:49 +02:00
Christian Brauner
9104c79a1d
tools: fix unitialized variable
Closes #2242.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-29 18:20:35 +02:00
Stéphane Graber
5b66b6ee3e
Release LXC 3.0.0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 21:49:16 -04:00
Stéphane Graber
21773a9522
Merge pull request #2239 from brauner/2018-03-27/fixup_action_script
Allow passing action scripts to CRIU
2018-03-27 16:49:34 -04:00
Eytan Heidingsfeld
590197542e
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>
2018-03-27 22:33:48 +02:00
Christian Brauner
808108a949
Merge pull request #2238 from stgraber/master
configure.ac: Support redhatenterpriseserver
2018-03-27 13:02:33 -07:00
Stéphane Graber
b195038dfc
configure.ac: Support redhatenterpriseserver
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 15:21:51 -04:00
Stéphane Graber
769cf3c1cc
Release LXC 3.0.0.beta4
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-26 23:38:01 -04:00
Stéphane Graber
f4ffd9f873
Merge pull request #2237 from brauner/2018-03-26/always_make_dumpable
start: always make us dumpable
2018-03-26 18:11:31 -04:00
Christian Brauner
d788372535
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>
2018-03-26 23:04:12 +02:00
Stéphane Graber
065d5d0d3a
Merge pull request #2235 from brauner/2018-03-25/simplify_autodev
conf: simplify autodev
2018-03-25 22:30:58 -04:00
Christian Brauner
5e73416ffe
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>
2018-03-26 02:21:56 +02:00
Stéphane Graber
6af6b30a87
Merge pull request #2232 from flx42/dhclient-hook-apparmor
hooks: fix dhclient hook when an AppArmor profile is active
2018-03-24 00:36:32 -04:00
Stéphane Graber
b53a26168c
Release LXC 3.0.0.beta3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-23 16:22:00 -04:00
Stéphane Graber
2715bbf9bc
Merge pull request #2233 from brauner/2018-03-23/truncate_config_file
lxccontainer: truncate config file
2018-03-23 15:44:52 -04:00
Christian Brauner
10034af509
lxccontainer: truncate config file
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-23 20:30:38 +01:00
Christian Brauner
cc8d4ec015
Merge pull request #2231 from stgraber/master
pam: Fix missing symbols in module
2018-03-23 18:54:22 +01:00
Felix Abecassis
41be52e8ab hooks: fix dhclient hook when an AppArmor profile is active
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-23 10:47:35 -07:00
Stéphane Graber
60534f79d2
pam: Fix missing symbols in module
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-23 13:26:24 -04:00
Stéphane Graber
1b849a8ffa
Merge pull request #2229 from fliiiix/lxc_net_improvements
Rename ifup/down and remove usless parameter passing
2018-03-22 12:35:43 -04:00
Christian Brauner
dad96df80b
Merge pull request #2230 from tych0/drop-log-whitespace
remove leading whitespace from log files
2018-03-22 17:22:55 +01:00
fliiiix
1b459eded4 Rename ifup/down and remove usless parameter passing
Signed-off-by: Felix <de-ch@hotmail.de>
2018-03-22 17:11:17 +01:00