Christian Brauner
af25ca3080
storage/dir: use "source" and "target" as terms
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:15 +02:00
Christian Brauner
36902d078a
storage/dir: retrieve proper source path later
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:14 +02:00
Christian Brauner
6cf21d9196
storage/dir: use clear error messages
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:13 +02:00
Christian Brauner
4881d9999a
storage/dir: bdev->dest can't be empty
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:12 +02:00
Christian Brauner
73bac9c1af
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-29 15:59:11 +02:00
Evgeny Vereshchagin
3a07cd4220
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-29 15:59:10 +02:00
Evgeny Vereshchagin
b94e81426b
tests: run the fuzzers along with the other tests
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-29 15:59:10 +02:00
Evgeny Vereshchagin
a913759eb1
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-29 15:59:09 +02:00
Evgeny Vereshchagin
bf1e52ab87
ci: switch to --enable-fuzzers
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-29 15:59:08 +02:00
Evgeny Vereshchagin
06b14efd10
build-system: add --enable-fuzzers
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-29 15:59:07 +02:00
Christian Brauner
35a9c96cb8
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-29 15:59:06 +02:00
Christian Brauner
5f5df0dcec
conf: s/lxc_rootfs_prepare/lxc_rootfs_init/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:05 +02:00
Christian Brauner
16fca1258c
conf: move all mount options into struct lxc_mount_options
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:03 +02:00
Christian Brauner
3b59ddb67d
conf: stash lxc_storage into lxc_rootfs and bind to its lifetime
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:02 +02:00
Christian Brauner
c910e00de1
configure: fix function detection
...
Fixes : #3809
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-29 15:59:01 +02:00
Christian Brauner
930aded51c
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-29 15:58:58 +02:00
Christian Brauner
c1831266cb
conf: don't overrun dest buffer in parse_lxc_mntopts()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:09:19 +02:00
Christian Brauner
fe45f5d880
conf: better naming
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:09:18 +02:00
Christian Brauner
0876c9c3cc
getsubopt: use correct include
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:09:17 +02:00
Christian Brauner
615d8f8c8b
Makefile: fix strchrnul() inclusion
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:09:01 +02:00
Christian Brauner
53ba276251
conf: include strchrnul for platforms that don't support it
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:40 +02:00
Christian Brauner
310f5976da
strchrnul: include header
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:39 +02:00
Christian Brauner
9bdae39f86
conf: don't allow idmapped lxc.mount.{entry,fstab} just yet
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:37 +02:00
Christian Brauner
0125a899a9
conf: tweak parse_lxc_mntopts()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:36 +02:00
Christian Brauner
4f0e018646
apparmor: handle on-exec
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:34 +02:00
Christian Brauner
a45cba8765
attach: use correct lxc_namespace_t type
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:33 +02:00
Christian Brauner
d07d0091f4
attach: visually separate pids from fds during initalization
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:31 +02:00
Christian Brauner
7597491b5a
conf: verify that the rootfs can support idmapped mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:28 +02:00
Christian Brauner
88dff0a5fd
start: documented idmapped mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:27 +02:00
Christian Brauner
fb9f0d8468
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-23 09:07:26 +02:00
Christian Brauner
45e08d76c9
conf: support idmapping directories
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:24 +02:00
Christian Brauner
f3dde9c37c
mount_utils: add helper to determine whether new mount api supports bind mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:22 +02:00
Christian Brauner
39c2e2e32b
storage: keep a reference to lxc_rootfs in lxc_storage
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:21 +02:00
Christian Brauner
1633166b85
mount_utils: add support for mount_setattr() syscall
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:20 +02:00
Christian Brauner
4c51f61472
confile: parse idmap=<path> mount option for rootfs
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:19 +02:00
Christian Brauner
70e105ee18
conf: add first, trivial support for idmapped mounts
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:07:08 +02:00
Christian Brauner
a2d701dae1
conf: rework lxc specific mount option parsing
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-23 09:06:52 +02:00
Evgeny Vereshchagin
8b83dcdfc7
seccomp: init and destroy notifier.cookie
...
It's a follow-up to 84cf6d259b
Closes https://github.com/lxc/lxc/issues/3806
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-23 09:06:45 +02:00
Evgeny Vereshchagin
5855f270b5
autoconf: stop passing -fsanitize=address via AM_LDFLAGS
...
The snippet is redundant because the build system automatically
passes the sanitizers flags set in AM_CFLAGS to the linker
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:11 +02:00
Evgeny Vereshchagin
6b2e9a0fc6
ci: get rid of the -static-libasan stopgap
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:10 +02:00
Evgeny Vereshchagin
bbed65ec88
build-system: stop building init.lxc.static with sanitizers
...
`-static` isn't compatible with `-fsanitize=`:
```
gcc: error: cannot specify -static with -fsanitize=address
```
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:10 +02:00
Evgeny Vereshchagin
e83874ca22
autoconf: add AC_LANG_SOURCE to CC_CHECK_LDFLAGS
...
Inspired by https://lore.kernel.org/alsa-devel/18135209-abc9-ca1c-84e0-8ac3e75caaf1@perex.cz/t/
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:09 +02:00
Evgeny Vereshchagin
4a0a06175e
ci: make use of --enable-sanitizers instead of CFLAGS
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:08 +02:00
Evgeny Vereshchagin
d5c1b3ab2c
tests: free the buffer filled by lxc_cmd_rsp_recv
...
Fixes https://github.com/lxc/lxc/issues/3796
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:07 +02:00
Evgeny Vereshchagin
c3d3cebd74
Revert "ci: get around https://github.com/lxc/lxc/issues/3796 "
...
This reverts commit 44818e893e
.
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:06 +02:00
Evgeny Vereshchagin
e19c80075c
ci: build with -Wall -Werror
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:05 +02:00
Evgeny Vereshchagin
c20326dc6f
ci: turn on strict_string_checks
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:05 +02:00
Evgeny Vereshchagin
6856fc54ed
ci: get around https://github.com/lxc/lxc/issues/3796
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:04 +02:00
Evgeny Vereshchagin
d2139d6be5
ci: prevent lxc-exercise from running indefinitely
...
and show all the commands it runs to make it easier to
debug potential issues.
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:03 +02:00
Evgeny Vereshchagin
660b74d5dc
ci: get around https://github.com/lxc/lxc/issues/3788
...
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-21 10:05:02 +02:00