Christian Brauner
b8b31ab36a
oss-fuzz: more meson options
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-08 20:15:07 +02:00
Christian Brauner
d679f7d85f
build: lxc-init doesn't need to build the whole config infra
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-08 20:03:59 +02:00
Christian Brauner
5b726537aa
build: use liblxc_sources everywhere
...
The old split didn't buy us a lot and causes problems when buidling with
sanitizers enabled so just use the full sources.
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-08 20:01:26 +02:00
Stéphane Graber
6ae86a9c17
src: Don't use ifdef/defined for config.h
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-08 00:47:05 -04:00
Stéphane Graber
4c8139f9cf
Remove autotools
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-08 00:46:59 -04:00
Stéphane Graber
7eac83c1b1
meson: Fix mntent include condition
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:26:47 -04:00
Stéphane Graber
61c40023d0
lxc/rexec: Use HAVE_FEXECVE
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:26:46 -04:00
Stéphane Graber
199241209f
meson: Add missing prlimit include
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:13 -04:00
Stéphane Graber
7a489adb89
meson: Only build seccomp and selinux when needed
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:12 -04:00
Stéphane Graber
8135966d1d
meson: Make lxc-user-nic setuid
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:06 -04:00
Stéphane Graber
1ccdc25349
meson: Don't include lxc-test-fuzzers
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:05 -04:00
Stéphane Graber
5055c73d91
meson: Skip static library when using sanitizer
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:04 -04:00
Stéphane Graber
8d77f43f5c
meson: Cleanup and fix includes
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:04 -04:00
Stéphane Graber
eba7f7a6bc
meson: Rework configuration variables
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-02 16:50:00 -04:00
Stéphane Graber
fb15f1c0da
meson: Simplify if statements
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-30 16:00:11 -04:00
Stéphane Graber
a79b0663b4
meson: Only build tools when requested
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-27 22:02:37 -04:00
Stéphane Graber
24dcd86d9a
meson: Re-shuffle PAM
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-27 22:02:35 -04:00
Stéphane Graber
771050e5c4
Merge pull request #4120 from brauner/2022-05-18.meson.pam
...
build: add pam_cgfs to meson
2022-05-24 10:26:38 -04:00
Ivan Prisyazhnyy
4afaadf02c
lxc_can_use_pidfd: don't log error if pidfds not supported, trace
...
Signed-off-by: Ivan Prisyazhnyy <john.koepi@gmail.com>
2022-05-20 16:30:30 +02:00
Christian Brauner
8c8e72826f
pam: fix compiler warnings
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-05-19 11:49:48 +02:00
Christian Brauner
8c48813a6c
build: add pam_cgfs to meson
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-05-19 11:49:48 +02:00
Stéphane Graber
9647df5464
Merge pull request #4115 from terceiro/rename-completion
...
bash: rename main bash completion file
2022-05-15 16:58:16 -04:00
Stéphane Graber
d9121fff7b
meson: Add remaining scripts
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-12 22:24:04 +02:00
Antonio Terceiro
25d1b3fb09
bash: rename main bash completion file
...
Since the `lxc` binary is actually provided by lxd, the main
bash-completion file needs to be moved away to not conflict with a bash
completion file provided for the `lxc` binary by lxd.
Signed-off-by: Antonio Terceiro <terceiro@debian.org>
2022-05-12 10:47:18 -03:00
Stéphane Graber
1a9afaccbf
meson: Include headers
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-01 11:50:17 +02:00
Stéphane Graber
0940e81168
meson: Add lxc-attach
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-01 10:24:33 +02:00
Stéphane Graber
2f1bf5f58b
meson: Fix internal binaries
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-01 10:24:32 +02:00
Stéphane Graber
a15711569e
meson: Get test binaries to match autotools
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-01 10:24:30 +02:00
Stéphane Graber
4738079024
meson: Install the test binaries
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-04-28 22:54:39 -04:00
Stéphane Graber
20b03401be
meson: Cleanup build configs
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-04-28 22:17:01 -04:00
Stéphane Graber
df05cddc83
meson: Remove non-existent tests
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-04-28 17:55:11 -04:00
corubba
8f8d14f72d
tools: lxc-autostart: Reverse order on stop
...
As it was already discussed in lxc/lxd#2082 , containers should be
stopped in the opposite order they are started in. LXD does so already,
lxc should do the same.
Signed-off-by: Corubba Smith <corubba@gmx.de>
2022-03-27 01:36:20 +01:00
Leesoo Ahn
0a0911faee
utils: add fastpath routine on mkdir_p function
...
Call 'access' to examine whether 'dir' is already existed or not instead
of directly calling 'mkdir' on each dir name separated by slash '/' even though
'dir' is existed.
Signed-off-by: Leesoo Ahn <lsahn@ooseel.net>
2022-03-26 22:22:10 +09:00
Christian Brauner
cf9e29f352
build: add more tests to meson
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-03-23 16:11:00 +01:00
Christian Brauner
44c22b8a95
tests: fix include statements
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-03-23 16:10:48 +01:00
Christian Brauner (Microsoft)
2cf04d6695
build: add tests to meson
...
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-03-22 08:48:43 +01:00
Jami Kettunen
b7affe5264
lxc-checkconfig: Only check probed modules if /proc/modules exists
...
Kernels can be built with CONFIG_MODULES=n which results in
is_probed() telling the module isn't probed and lsmod spamming the
following to stderr each time it's called:
libkmod: kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
Fix this by "stubbing" is_probed() when /proc/modules doesn't exist
as it's always called after a is_enabled() anyway.
Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
2022-03-08 12:37:08 +02:00
Christian Brauner
2e67b0d47f
cgroups: modify cgroup2 attach logic
...
Recent kernels have seen various permission checking fixes when moving
processes into cgroups. So we're forced to modify how we attach to
containers.
Link: https://discuss.linuxcontainers.org/t/lxd-4-23-unable-to-start-nested-containers
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-23 15:58:27 +01:00
Christian Brauner
3b9f84fd23
ttys: ensure container_ttys= env variable is set correctly
...
Fixes : #4088
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-22 12:20:15 +01:00
Christian Brauner
f7abb27245
cgroups: log fd of newly created cgroup
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-20 15:52:10 +01:00
Christian Brauner
c090dbedbd
cgroups: check that opened file descriptor is a cgroup filesystem
...
Link: https://discuss.linuxcontainers.org/t/lxd-4-23-unable-to-start-nested-containers/13416
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-20 15:47:28 +01:00
Stéphane Graber
903b1996b9
lxc-checkconfig: Fix bashism
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-02-02 21:11:09 -05:00
Christian Brauner
1238fee01b
lxccontainer: allow xdev when creating the container dir
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-21 09:44:01 +01:00
Christian Brauner
e53abc4196
lxccontainer: properly wrap lxcapi_create()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
e27637b7b9
build: simplify thread local storage handling
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
c123aa042a
lxccontainer: simplify partial file creation
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
0e375b104b
lxccontainer: improve create_partial()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
07ea844f4e
lxccontainer: improve do_lxcapi_create()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
78ffe01108
lxccontainer: improve do_lxcapi_save_config()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
e5af72a666
conf: log termination status
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00