Christian Brauner
60dc8124d8
storage/dir: cleanup mount code
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:33:37 +02:00
Christian Brauner
a246068620
storage/dir: remove error handling down
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:27:58 +02:00
Christian Brauner
b6234735b2
storage/dir: source can't be empty
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:26:59 +02:00
Christian Brauner
196a800af5
storage/dir: use "source" and "target" as terms
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:26:11 +02:00
Christian Brauner
31278920a8
storage/dir: retrieve proper source path later
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:24:15 +02:00
Christian Brauner
e2e3c93878
storage/dir: use clear error messages
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:23:03 +02:00
Christian Brauner
0b2e168841
storage/dir: bdev->dest can't be empty
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:21:03 +02:00
Christian Brauner
0476883131
dir: use mnt_opts->data instead of mntdata
...
Fixes: https://launchpadlibrarian.net/535845165/buildlog_ubuntu-focal-s390x.lxc_1%3A4.0.6+master~20210427-2321-0ubuntu1~focal_BUILDING.txt.gz
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 11:19:47 +02:00
Stéphane Graber
8f7b7b8d42
Merge pull request #3811 from brauner/2021-04-25.idmapped_mounts.rootfs
...
rootfs rework
2021-04-27 18:42:41 -04:00
Evgeny Vereshchagin
a10327e7d8
build-system: turn off lto=thin when building the fuzzers
...
With lto=thin the fuzzers fail as soon as they start with
```
ERROR: The size of coverage PC tables does not match the
number of instrumented PCs. This might be a compiler bug,
please contact the libFuzzer developers.
Also check https://bugs.llvm.org/show_bug.cgi?id=34636
for possible workarounds (tl;dr: don't use the old GNU ld)
```
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-27 00:34:22 +00:00
Evgeny Vereshchagin
aa96786737
tests: run the fuzzers along with the other tests
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-26 21:41:54 +00:00
Evgeny Vereshchagin
4a6af91855
log: create log files in "fuzzing" mode if it's called outside fuzz targets
...
to make it possible to run the fuzzers along with the other tests
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-26 19:57:56 +00:00
Evgeny Vereshchagin
1667e14e07
ci: switch to --enable-fuzzers
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-26 19:57:56 +00:00
Evgeny Vereshchagin
38718ccca0
build-system: add --enable-fuzzers
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-26 19:57:56 +00:00
Christian Brauner
4b875ef96a
conf: improve idmapped mounts support
...
Setting up a detached idmapped mount is a privileged operation, mounting
it doesn't have to be.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-25 13:55:50 +02:00
Christian Brauner
239f29c92d
conf: s/lxc_rootfs_prepare/lxc_rootfs_init/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-25 13:55:49 +02:00
Christian Brauner
423374e953
conf: move all mount options into struct lxc_mount_options
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-25 13:55:49 +02:00
Christian Brauner
4e86cad35b
conf: stash lxc_storage into lxc_rootfs and bind to its lifetime
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-25 13:55:49 +02:00
Stéphane Graber
b9f3cd48ec
Merge pull request #3810 from brauner/2021-04-24.fixes
...
configure: fix function detection
2021-04-24 13:48:56 -04:00
Christian Brauner
305b3b9c14
configure: fix function detection
...
Fixes : #3809
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-24 11:19:53 +02:00
Stéphane Graber
6e66aa5b3e
Merge pull request #3808 from brauner/2021-04-23.fixes
...
dir: fix rootfs mounting
2021-04-23 08:48:51 -04:00
Christian Brauner
9e21bb6f56
dir: fix rootfs mounting
...
We need to be able to lookup symlinks and allow xdev.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 11:29:47 +02:00
Christian Brauner
6ecffe66c2
Merge pull request #3807 from evverx/seccom-leak
...
seccomp: init and destroy notifier.cookie
2021-04-23 06:58:33 +02:00
Stéphane Graber
e3d404cb57
Merge pull request #3805 from brauner/2021-04-22.fixes.3
...
mntopt fixes
2021-04-22 16:40:27 -04:00
Christian Brauner
2e5c468aa5
conf: don't overrun dest buffer in parse_lxc_mntopts()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-22 21:09:12 +02:00
Christian Brauner
d97d9e9ff9
conf: better naming
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-22 20:55:46 +02:00
Stéphane Graber
5a65643b19
Merge pull request #3804 from brauner/2021-04-22.fixes.2
...
getsubopt: use correct include
2021-04-22 08:59:16 -04:00
Christian Brauner
d38f448a8e
getsubopt: use correct include
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-22 14:39:37 +02:00
Stéphane Graber
1cb6974419
Merge pull request #3803 from brauner/2021-04-22.fixes
...
include fixes for Bionic
2021-04-22 07:40:21 -04:00
Christian Brauner
317410da66
Makefile: fix strchrnul() inclusion
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-22 12:10:56 +02:00
Christian Brauner
60933dae08
conf: include strchrnul for platforms that don't support it
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-22 09:45:13 +02:00
Christian Brauner
535bc5aac2
strchrnul: include header
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-22 09:44:07 +02:00
Stéphane Graber
c11af9735f
Merge pull request #3709 from brauner/2021-03-17/idmapped_mounts_v2
...
Initial support for idmapped mounts
2021-04-21 20:05:12 -04:00
Christian Brauner
fa8e75f009
conf: don't allow idmapped lxc.mount.{entry,fstab} just yet
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:07:35 +02:00
Christian Brauner
8e05f35018
conf: tweak parse_lxc_mntopts()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:07:35 +02:00
Christian Brauner
389eb7c6da
apparmor: handle on-exec
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:07:34 +02:00
Christian Brauner
2533995e79
attach: use correct lxc_namespace_t type
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:07:34 +02:00
Christian Brauner
f620ed4433
attach: visually separate pids from fds during initalization
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:07:32 +02:00
Christian Brauner
657ed14a98
conf: verify that the rootfs can support idmapped mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:59 +02:00
Christian Brauner
26ad2c6f3a
start: documented idmapped mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:59 +02:00
Christian Brauner
d347d35633
mount_utils: add two detached mount helpers
...
They'll come in handy in the future.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:59 +02:00
Christian Brauner
e26cf56313
conf: support idmapping directories
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:59 +02:00
Christian Brauner
d4e07569bb
mount_utils: add helper to determine whether new mount api supports bind mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:59 +02:00
Christian Brauner
79defd8833
storage: keep a reference to lxc_rootfs in lxc_storage
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:59 +02:00
Christian Brauner
031e0285fa
mount_utils: add support for mount_setattr() syscall
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:58 +02:00
Christian Brauner
16fcdacc24
confile: parse idmap=<path> mount option for rootfs
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:58 +02:00
Christian Brauner
f6815906a1
conf: add first, trivial support for idmapped mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:58 +02:00
Christian Brauner
0b932f9ded
conf: rework lxc specific mount option parsing
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-21 10:05:58 +02:00
Christian Brauner
12cf9f5a56
Merge pull request #3801 from evverx/san-tweaks
...
ci: make use of --enable-sanitizers instead of CFLAGS
2021-04-21 07:27:31 +02:00
Christian Brauner
6622f6514c
Merge pull request #3800 from evverx/gh3796
...
Revert "ci: get around https://github.com/lxc/lxc/issues/3796 "
2021-04-19 17:19:18 +02:00