Commit Graph

10890 Commits

Author SHA1 Message Date
Christian Brauner
3860899204
tree-wide: make personality codepaths unconditional
Now that we have the infra to make personality handling unconitional
remove the ifndefs everywhere.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-05-04 15:27:44 +02:00
Christian Brauner
3857c4ebf0
syscalls: wrap personality syscall if undefined
There's no need to making personality handling conditional as it has
been around for such a long time that only weird systems wouldn't have
support for it. And especially if the user requested a specific
personality to be set but the system doesn't support the personality
syscall we should loudly fail instead of moving on.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-05-04 15:15:28 +02:00
Christian Brauner
1d74176da2
commands: log at debug not info level when receiving file descriptors
Don't spam the logs because we do receive a lot of file descriptors.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-05-04 15:15:08 +02:00
Christian Brauner
5f2a6ec4e1
confile: make per_name struct static
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-05-04 15:14:09 +02:00
Christian Brauner
13723cb9e5
Merge pull request #3823 from evverx/gcc-11-workaround
string_utils: get around GCC-11 false positives
2021-05-04 05:10:35 +02:00
Stéphane Graber
3176d82e3a
Merge pull request #3824 from evverx/sanitizers-follow-ups
github: remove the dh-* packages
2021-05-03 19:59:44 -04:00
Evgeny Vereshchagin
6d345aa40d string_utils: get around GCC-11 false positives
by getting rid of stpncpy

Tested with gcc (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1)

Closes https://github.com/lxc/lxc/issues/3752

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-05-03 23:07:20 +00:00
Evgeny Vereshchagin
bfb24cf0fd github: also pass the j option to make
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-05-03 22:35:19 +00:00
Evgeny Vereshchagin
72f83931b3 github: remove the dh-* packages
We don't build any packages there so it seems we don't need
those packages any more. Apart from that, it should make the
script work on Ubuntu Hirsute where dh-systemd was merged into
debhelper and is no longer available.

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-05-03 22:33:17 +00:00
Stéphane Graber
705b2c32d1
Merge pull request #3819 from dev-aaront-org/console-mode-messages
conf: fix console chmod error log messages
2021-05-03 08:03:25 -04:00
Christian Brauner
58f5195d67
Merge pull request #3822 from stgraber/master
github: Run apt-get update in sanitizer test
2021-05-03 14:03:14 +02:00
Stéphane Graber
4919245709
Merge pull request #3820 from brauner/2021-05-03.lxc_monitord.log
lxc_monitord: remove monitord log
2021-05-03 08:03:03 -04:00
Stéphane Graber
5687858702
github: Run apt-get update in sanitizer test
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2021-05-03 08:02:14 -04:00
Christian Brauner
8ee2f36fc3
lxc_monitord: remove monitord log
The tool is effectively unused with current master so removing the log
should be ok by now. Let's remove the log to avoid issues such as #3747.

Fixes #3747
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-05-03 08:59:02 +02:00
Christian Brauner
86deb111ae
Merge pull request #3818 from evverx/disable-logs-on-oss-fuzz
oss-fuzz: always turn off logging on OSS-Fuzz
2021-05-01 08:29:20 +02:00
Aaron Thompson
07020e481a conf: fix console chmod error log messages
Signed-off-by: Aaron Thompson <dev@aaront.org>
2021-05-01 01:20:14 +00:00
Stéphane Graber
122413ad4e
Merge pull request #3817 from brauner/2021-04-30.fixes
cgroups: fix fallback attach codepath
2021-04-30 10:03:58 -04:00
Christian Brauner
112ccbc913
cgroups: fix fallback attach codepath
When we attach to an old server the server can return ENOSYS instead of
ENOCGROUP2 which causes LXC to abort the attach unnecessary. Fix this!

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-30 15:49:39 +02:00
Stéphane Graber
b75c91deeb
Merge pull request #3816 from brauner/2021-04-30/fixes
storage: fix dup_cloexec() call
2021-04-30 08:45:18 -04:00
Evgeny Vereshchagin
a390325fdf oss-fuzz: always turn off logging on OSS-Fuzz
Apparently /proc/self/cmd can't be used (reliably) on OSS-Fuzz to figure out
whether the code is run inside the fuzz targets, which causes the
fuzz targets to fill the filesystem with log files.

Related: https://github.com/google/oss-fuzz/issues/5509
Should address https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33835

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2021-04-30 11:19:21 +00:00
Christian Brauner
2570cdf3fe
storage: fix dup_cloexec() call
Fixes: Coverity 1477399
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-30 10:35:06 +02:00
Stéphane Graber
7a2bd5db2c
Merge pull request #3814 from brauner/2021-04-28.fixes
api-extensions: add entry for idmapped_mounts
2021-04-28 09:52:30 -04:00
Christian Brauner
fa3a003464
api-extensions: add entry for idmapped_mounts
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-04-28 15:39:37 +02:00
Stéphane Graber
6d93802001
Merge pull request #3812 from brauner/2021-04-28.fixes
storage/dir: cleanup mount code
2021-04-28 08:57:16 -04:00
Christian Brauner
94363265bd
Merge pull request #3802 from evverx/build-system-fuzzers
oss-fuzz: switch to --enable-fuzzers
2021-04-28 11:59:26 +02:00
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