Christian Brauner
3fcae2e4a2
string_utils: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:08:48 +01:00
Christian Brauner
c66f3f43c2
terminal: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:08:47 +01:00
Christian Brauner
62eda135f4
start: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:08:46 +01:00
Christian Brauner
2b416048bd
seccomp: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:08:45 +01:00
Christian Brauner
c829cc09a4
rexec: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:08:44 +01:00
Christian Brauner
c937bea736
network: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:08:28 +01:00
Christian Brauner
2b38c3a1a2
mount_utils: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:37 +01:00
Christian Brauner
6137f654a5
monitor: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:37 +01:00
Christian Brauner
272707bf9b
lxclock: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:36 +01:00
Christian Brauner
6ba3f51747
lxccontainer: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:35 +01:00
Christian Brauner
ed6988d90c
log: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:35 +01:00
Christian Brauner
efcfb3609c
file_utils: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:34 +01:00
Christian Brauner
9b9758c64b
criu: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:33 +01:00
Christian Brauner
e6aeee836d
confile_utils: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:33 +01:00
Christian Brauner
18105e58be
confile: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:32 +01:00
Christian Brauner
b4d3e2f451
conf: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:31 +01:00
Christian Brauner
30a8157944
commands_utils: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:31 +01:00
Christian Brauner
a80bd4769d
attach: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:30 +01:00
Christian Brauner
76ae4ba250
cgroups: convert to strnprintf()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:29 +01:00
Christian Brauner
f13e60dbc4
string_utils: add wrapper for snprintf()
...
This let's us avoid the tedious
if (ret < 0 || (size_t)ret >= sizeof(buf))
style of error checking.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:29 +01:00
Christian Brauner
accd629148
cgroups: log container process entering
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:28 +01:00
Christian Brauner
4691665b8c
cgroups: log monitor and transient process entering
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:27 +01:00
Christian Brauner
bbbd4a460e
cgroups: do not return early when entering monitor cgroups
...
This will happen when restoring a container via criu.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:27 +01:00
Christian Brauner
045ed5d93f
cgroups: use brackets to have clear semantics for flags checking
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:26 +01:00
Christian Brauner
b82bb22c0c
criu: handle new cgroup layout
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:25 +01:00
Christian Brauner
2682ad1604
criu: lxc_init() already initializes cgroups
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:24 +01:00
Christian Brauner
1aaba0a0c6
criu: warn about cgroup hierarchies without controllers
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:24 +01:00
Christian Brauner
38aaaeb710
criu: rework init pid retrieval
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:23 +01:00
Christian Brauner
29f36c718e
criu: use cleanup macro when parsing mount data
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:22 +01:00
Christian Brauner
934d0d8b16
criu: use cleanup macro
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:22 +01:00
Christian Brauner
dc05afb2f1
criu: move logging under lxc_log_trace()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:21 +01:00
Christian Brauner
2b6fc88b7b
criu: massage exec_criu()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:20 +01:00
Christian Brauner
c8338a6c8d
criu: mark cgroups methods specific to criu
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:19 +01:00
Christian Brauner
e78117f958
conf: fix memory leak
...
Fixes: Coverity 1472848
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:18 +01:00
Christian Brauner
b4e90f9f1f
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:18 +01:00
Christian Brauner
eefaa69c4b
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:17 +01:00
Christian Brauner
8935d6e60c
tests: add logging to lxc-test-unpriv
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:16 +01:00
Christian Brauner
f411dfea13
conf: fd-only tty setup
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:15 +01:00
Christian Brauner
dcd11783ac
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-26 21:07:14 +01:00
Christian Brauner
b01c4bfc55
conf: rework rootfs pinning
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:14 +01:00
Max
06151d4a37
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-26 21:07:13 +01:00
Christian Brauner
41e9f73c27
conf: kill PAT_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:12 +01:00
Christian Brauner
6185368cf1
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:11 +01:00
Christian Brauner
db37aefca3
conf: don't pass struct lxc_conf
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:10 +01:00
Christian Brauner
dfaa5d997e
conf: kill PATH_MAX bytes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:09 +01:00
Christian Brauner
a7f145beff
conf: s/setup_mount()/setup_mount_fstab()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:08 +01:00
Christian Brauner
3c0117ccfb
mount_utils: add locked flag helpers
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:07 +01:00
Christian Brauner
a7141930fe
mount_utils: kill mount_filesystem()
...
We have way better helpers now.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:07 +01:00
Christian Brauner
177458b6fa
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-26 21:07:06 +01:00
Christian Brauner
20af37f789
mount_utils: initialize fd
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-26 21:07:05 +01:00