Christian Brauner
b41a8023b8
criu: lxc_init() already initializes cgroups
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 13:14:11 +01:00
Christian Brauner
92fde26d7b
criu: warn about cgroup hierarchies without controllers
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 13:03:06 +01:00
Christian Brauner
2539492cc9
criu: rework init pid retrieval
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:52:30 +01:00
Christian Brauner
5257b91b6e
criu: use cleanup macro when parsing mount data
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:52:30 +01:00
Christian Brauner
6eff3c0d79
criu: use cleanup macro
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:52:30 +01:00
Christian Brauner
2541dfab38
criu: move logging under lxc_log_trace()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:52:26 +01:00
Christian Brauner
59d8a539d1
criu: massage exec_criu()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:31:01 +01:00
Christian Brauner
ff9edd2d04
criu: mark cgroups methods specific to criu
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:27:51 +01:00
Christian Brauner
9d0e129b54
conf: fix memory leak
...
Fixes: Coverity 1472848
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-10 12:27:50 +01:00
Stéphane Graber
11a3696fda
Merge pull request #3661 from blenk92/iw_error_msg
...
network: Add error message if iw couldn't be found
2021-02-09 10:46:19 -05:00
Stéphane Graber
642429e57b
Merge pull request #3662 from brauner/2021-02-08/fixes
...
conf: expand fd-only setup codepaths
2021-02-09 10:07:28 -05:00
Christian Brauner
58b381117d
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 21:59:20 +01:00
Christian Brauner
887ae844d5
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 21:59:19 +01:00
Christian Brauner
17d9d07275
tests: add logging to lxc-test-unpriv
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 21:59:19 +01:00
Christian Brauner
7369e6bf6d
conf: fd-only tty setup
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 21:59:19 +01:00
Christian Brauner
ade356b90c
mount_utils: s/OPEN_TREE_CLONE | OPEN_TREE_CLONE/OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 21:59:19 +01:00
Christian Brauner
79ff643d24
conf: rework rootfs pinning
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 21:59:15 +01:00
Max
0ed79f452a
network: Add error message if iw couldn't be found
...
When iw is not installed on the host, lxc fails to move wireless devices
into a container. Unfortunately there is no real error message yet
(other than that it didn't work), so its quite unobvious what causes
this. This commit adds a error message that clearly states the
application iw is missing.
Signed-off-by: Maximilian Blenk <blenkmax@gmail.com>
2021-02-08 20:42:27 +01:00
Christian Brauner
4806d3b9ec
conf: kill PAT_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 10:22:41 +01:00
Christian Brauner
9c0fd29a5c
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 10:22:41 +01:00
Christian Brauner
48e5dcc85a
conf: don't pass struct lxc_conf
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 10:22:41 +01:00
Christian Brauner
8183f09e00
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 10:22:36 +01:00
Christian Brauner
b28aae045e
conf: s/setup_mount()/setup_mount_fstab()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 09:54:57 +01:00
Christian Brauner
ac11febd37
mount_utils: add locked flag helpers
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 09:53:34 +01:00
Stéphane Graber
01149adf72
Merge pull request #3660 from brauner/2021-02-05/fixes_1
...
mount_utils: initialize fd
2021-02-05 17:01:39 -05:00
Christian Brauner
60218ee70b
mount_utils: kill mount_filesystem()
...
We have way better helpers now.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 21:49:51 +01:00
Christian Brauner
0d50f2882c
attach: switch to simple mount()
...
At the point where we're remounging proc and sys we're in the container's
namespaces so there's no chance of escape so a simple mount() syscall will
suffice.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 21:49:18 +01:00
Christian Brauner
5cf51172e3
mount_utils: initialize fd
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 21:21:01 +01:00
Stéphane Graber
338c2abe83
Merge pull request #3659 from brauner/2021-02-05/fixes
...
mount: extend support for the new mount api
2021-02-05 13:40:19 -05:00
Christian Brauner
635e7bac01
tree-wide: make use of new_mount_api() where it makes sense
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 19:01:32 +01:00
Christian Brauner
87545854f7
mount_utils: detect new mount api support
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:54 +01:00
Christian Brauner
55a85f4a11
mount_utils: kill mount_from_at()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:54 +01:00
Christian Brauner
d2c885f199
conf: use fd_bind_mount() in lxc_fill_autodev()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:54 +01:00
Christian Brauner
041d1e3054
mount_utils: add support for bind-mounts through the new mount api
...
fd_bind_mount()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:54 +01:00
Christian Brauner
ca9055b473
mount_utils: kill mount_at()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:54 +01:00
Christian Brauner
a099c5db1c
cgroups: switch __cg_mount_direct() to use the new mount api
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:54 +01:00
Christian Brauner
23a20dbea8
cgroups: switch tmpfs mounting to new mount api
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:53 +01:00
Christian Brauner
bfbfeedfab
conf: switch mount_autodev() to new mount api
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:53 +01:00
Christian Brauner
1f3eb95965
mount_utils: add extended helpers for new mount api
...
fs_prepare()
fs_set_property()
fs_attach()
fs_mount()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 18:52:49 +01:00
Christian Brauner
74ed30d721
mount_utils: move mount_at() and mount_from_at() over from utils.{c,h}
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:56:59 +01:00
Christian Brauner
b5daeddc5a
Merge pull request #3657 from brauner/2021-02-05/init_groups
...
conf: implement lxc.init.groups
2021-02-05 12:30:17 +01:00
Christian Brauner
7fe8120eca
confile: make garbage groups an error
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:14:09 +01:00
Christian Brauner
6f6c71cdca
tests: improve lxc.init.groups tests
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:14:08 +01:00
Christian Brauner
c71f64cbe0
confile: handle appending init groups
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:14:07 +01:00
Christian Brauner
4822319f31
conf: use lxc_groups_t directly
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:14:06 +01:00
Christian Brauner
fb4dbb516c
attach_options: use size_t for lxc_groups_t
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:14:05 +01:00
Christian Brauner
9475d2b9b6
attach: use brackets around flag check
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:14:02 +01:00
Christian Brauner
f5072dcd5f
attach_options: use standard C pointer syntax
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:13:28 +01:00
Christian Brauner
f41aa73b4e
attach_options: initialize .groups
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-05 12:13:25 +01:00
Ruben Jenster
8caac58373
attach: Add groups option to keep additional group IDs.
...
Signed-off-by: Ruben Jenster <r.jenster@drachenfels.de>
2021-02-05 12:13:24 +01:00