Christian Brauner
7a6ecf65bf
travis: build with -O0 for coverity
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-04 17:50:33 +02:00
Christian Brauner
6e0045bdd8
tests: add lxc.rootfs.managed test
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-31 22:09:34 +02:00
Christian Brauner
2a6d08c6e1
tests: cleanup get_item.c
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-31 22:09:34 +02:00
Christian Brauner
6e54330c46
conf: introduce lxc.rootfs.managed
...
This introduces a new config key lxc.rootfs.managed which can be used to
indicate whether this LXC instance is managing the container storage. If LXC is
not managing the storage then LXC will not modify the container storage.
For example, an API call to c->destroy(c) will then run any destroy hooks but
will not destroy the actual rootfs (Unless, of course, the hook does so behind
LXC's back.).
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
CC: Wolfgang Bumiller <w.bumiller@proxmox.com>
CC: Stéphane Graber <stgraber@ubuntu.com>
CC: Serge Hallyn <serge@hallyn.com>
CC: 2xsec <dh48.jeong@samsung.com>
2018-07-31 22:09:34 +02:00
Stéphane Graber
09ef5d954f
Merge pull request #2505 from brauner/2018-07-31/bugfixes
...
coverity: #438136
2018-07-31 10:55:16 -04:00
Christian Brauner
a3cf04da4d
READEM: update Serge's mail address
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Serge Hallyn <serge@hallyn.com>
2018-07-31 13:52:12 +02:00
Christian Brauner
aeba3f8005
coverity: #438136
...
String not null terminated
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-31 10:55:52 +02:00
Christian Brauner
8da51ee9b3
Merge pull request #2503 from tenforward/japanese
...
doc: Add incompatibility with network type=none into Japanese man
2018-07-31 09:17:47 +02:00
KATOH Yasufumi
e0e360c589
doc: Add incompatibility with network type=none into Japanese man
...
Update for commit e4b3e36
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2018-07-31 16:03:31 +09:00
Stéphane Graber
542d0f26e6
Merge pull request #2499 from brauner/lxc/master
...
bugfixes
2018-07-30 14:57:23 -04:00
Stéphane Graber
01fc55d5a7
Merge pull request #2475 from brauner/2018-07-16/monitor_signal_pdeath
...
conf: improve rootfs setup
2018-07-30 14:56:54 -04:00
Stéphane Graber
e6b4213b9e
Merge pull request #2502 from brauner/2018-07-27/fix_max_devpts_option
...
conf: mount devpts without "max" on EINVAL
2018-07-30 14:56:19 -04:00
Wolfgang Bumiller
dccffc8269
conf: don't return a clobbered errno value
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-07-30 20:30:50 +02:00
Christian Brauner
dfbd473039
conf: mount devpts without "max" on EINVAL
...
The "max" option to devpts got introduced in kernel 3.4.
Closes #2490 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 15:56:05 +02:00
Christian Brauner
7b52bc0bfe
Merge pull request #2500 from akosiaris/patch-1
...
Unprivileged's incompatibility with type=none docs
2018-07-30 15:32:19 +02:00
Alexandros Kosiaris
e4b3e369f8
Unprivileged's incompatibility with type=none docs
...
Unprivileged containers are not compatible with sharing the
host namespace due to an inability to mount sysfs. Add docs
in lxc.container.conf to document that out.
Refs #2463
Signed-off-by: Alexandros Kosiaris <akosiaris@gmail.com>
2018-07-30 15:18:27 +03:00
Christian Brauner
81f8706696
caps: handle EINTR in read()
...
We don't want to link caps.{c,h} against utils.{c,h} for the sake of our static
builds init.lxc.static. This means lxc_write_nointr() will not be available. So
handle it EINTR.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:42 +02:00
Christian Brauner
e0c198063d
log: handle EINTR in read()
...
We don't want to link log.{c,h} against utils.{c,h} for the sake of our static
builds init.lxc.static. This means lxc_write_nointr() will not be available. So
handle it EINTR.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:41 +02:00
Christian Brauner
a5bc6cb0e0
utils: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:39 +02:00
Christian Brauner
72f7c19b1a
terminal: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:37 +02:00
Christian Brauner
802e609aa9
monitor: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:35 +02:00
Christian Brauner
2a71131d33
monitor: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:34 +02:00
Christian Brauner
1fabf7d4ca
apparmor: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:33 +02:00
Christian Brauner
8367b31ea5
tools: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:32 +02:00
Christian Brauner
7b6f89cd4c
tools: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:31 +02:00
Christian Brauner
03876f90e2
sync: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:30 +02:00
Christian Brauner
ba38ff8e41
sync: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:29 +02:00
Christian Brauner
f640cf4606
network: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:28 +02:00
Christian Brauner
c72cda4ea4
network: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:27 +02:00
Christian Brauner
3e1e9db834
lxccontainer: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:26 +02:00
Christian Brauner
2a2a676d04
lxccontainer: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:25 +02:00
Christian Brauner
614be9bcec
criu: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:24 +02:00
Christian Brauner
668ba602ab
criu: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:22 +02:00
Christian Brauner
243fdadf8c
cmd: s/read()/lxc_read_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:21 +02:00
Christian Brauner
ff50dd77b4
cmd: s/write()/lxc_write_nointr()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:19 +02:00
Christian Brauner
04dc1c0078
cmd: s/pipe()/pipe2()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:18 +02:00
Christian Brauner
0ac84f04d1
lxccontainer: s/pipe()/pipe2()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:17 +02:00
Christian Brauner
9f4866a6f2
lxccontainer: cleanup do_lxcapi_get_interfaces()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:16 +02:00
Christian Brauner
de31cb57c2
criu: s/pipe()/pipe2()/
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:15 +02:00
Christian Brauner
adaffdd7a6
conf: always close pipe in run_userns_fn()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:14 +02:00
Christian Brauner
979f9e34c3
conf: s/pipe()/pipe2()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-30 00:16:13 +02:00
Christian Brauner
646b1be9bb
Merge pull request #2497 from brauner/2018-07-29/nl_fix
...
nl: avoid NULL pointer dereference
2018-07-29 18:46:42 +02:00
Rafał Miłecki
c8f0558964
nl: avoid NULL pointer dereference
...
It's a valid case to call nla_put() with NULL data and 0 len. It's done e.g. in
the nla_put_attr().
There has to be a check for data in nla_put() as passing NULL to the memcpy()
is not allowed. Even if length is 0, both pointers have to be valid.
For a reference see C99 standard (7.21.1/2), it says: "pointer arguments on
such a call shall still have valid values".
Reported-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[christian.brauner@ubuntu.com: adapted commit message]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-29 18:36:18 +02:00
Christian Brauner
3437f95c47
confile: split mount options into flags and data
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-29 18:28:44 +02:00
Christian Brauner
8ce1abc28a
conf: improve rootfs setup
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-29 14:32:15 +02:00
Stéphane Graber
a4f181a448
Merge pull request #2496 from flx42/nvidia-hook-lgpl
...
Fix license of the nvidia hook
2018-07-28 21:08:38 -04:00
Felix Abecassis
d23c6cc996
Fix license of the nvidia hook
...
Fixes : #2494
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-07-28 18:06:58 -07:00
Stéphane Graber
38a8a5e5fa
Merge pull request #2493 from brauner/2018-07-26/bugfixes
...
utils: add lxc_iterate_parts(), compile with -Wvla and -std=gnu11
2018-07-26 10:56:46 -04:00
Christian Brauner
81a56e8029
autotools: default to -Wvla -std=gnu11
...
We can't really support anything less than gcc-4.8 anyway.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-26 16:38:42 +02:00
Christian Brauner
dd94de5a87
include: remove VLAs
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-26 16:38:42 +02:00