Commit Graph

10927 Commits

Author SHA1 Message Date
Christian Brauner
d2022f30eb
conf: log session keyring failure on WARN level
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 10:03:13 +02:00
Christian Brauner
0d8d13be20
cgroups: log at warning instead of error level
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 10:03:12 +02:00
Christian Brauner
ea3c3688e1
Merge pull request #3926 from stgraber/master
doc/api-extensions: Grammar fix
2021-08-09 19:41:40 +02:00
Stéphane Graber
58795066dc
doc/api-extensions: Grammar fix
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2021-08-09 13:40:49 -04:00
Stéphane Graber
99ada0efc9
Merge pull request #3925 from brauner/2021-08-09.fixes
lsm/apparmor: small fixes
2021-08-09 10:25:07 -04:00
Christian Brauner
a36e286bea
lsm/apparmor: use cleanup macro
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-09 15:59:26 +02:00
Christian Brauner
0e8effda05
lsm/apparmor: log failure to write AppArmor profile
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-09 15:58:53 +02:00
Stéphane Graber
f14d72ba0f
Merge pull request #3923 from brauner/2021-08-05.fixes
network: fix container with empty network namespaces
2021-08-05 11:41:23 -04:00
Christian Brauner
43e2a96494
network: fix container with empty network namespaces
Fixes: #3922
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-05 16:16:33 +02:00
Stéphane Graber
b0a16da45a
Merge pull request #3921 from brauner/2021-08-03.fixes
conf: rootfs mount option fixes
2021-08-03 10:02:27 -04:00
Christian Brauner
587b2dff94
tests: add test for rootfs mount options
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 14:48:51 +02:00
Christian Brauner
704cadd524
conf: allow mount options for rootfs when using new mount api
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 13:16:45 +02:00
Christian Brauner
8cf6a64675
mount_utils: make some mount helpers static inline
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 12:51:24 +02:00
Christian Brauner
0f43436cbe
conf: let parse_vfs_attr() handle legacy mount flags as well
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 12:19:49 +02:00
Christian Brauner
777827cb3a
conf: log failure to create tty mountpoint
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 09:22:46 +02:00
Stéphane Graber
fa89ed65fa
Merge pull request #3920 from brauner/2021-08-02.fixes
mount_utils: introduce mount_at()
2021-08-02 14:33:37 -04:00
Christian Brauner
b35f8f7ef5
conf: refactor lxc_recv_ttys_from_child()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-02 19:21:08 +02:00
Christian Brauner
caaa223bc0
conf: fix logging in lxc_idmapped_mounts_child()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-02 18:47:44 +02:00
Christian Brauner
8b0ccdaaf3
mount_utils: introduce mount_at()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-02 15:30:03 +02:00
Stéphane Graber
1b8f92fe74
Merge pull request #3919 from brauner/2021-07-31.devpts
terminal: handle kernel without TIOCGPTPEER
2021-07-31 10:54:25 -04:00
Christian Brauner
64ac925fb1
terminal: fail on unknown error during TIOCGPTPEER
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-31 10:19:57 +02:00
Christian Brauner
23cc33cd90
terminal: move native terminal allocation from error logging to info
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-31 10:17:36 +02:00
Christian Brauner
18129d9471
conf: handle kernels without TIOCGPTPEER
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-31 10:14:39 +02:00
Stéphane Graber
81f0bf03ab
Merge pull request #3918 from brauner/2021-07-30.devpts
conf: rework console setup
2021-07-30 10:42:39 -04:00
Christian Brauner
9f77617b2e
start: allow containers to use a native console
After all of the previous rework we can make it possible for a container
to use a console allocated from the container's devpts instance.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 15:24:22 +02:00
Christian Brauner
4dcf0c43d6
terminal: remove unused argument from lxc_devpts_terminal()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 13:49:51 +02:00
Christian Brauner
d94a7f0911
conf: rework console setup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 13:31:03 +02:00
Christian Brauner
9910185a80
file_utils: add open_at_same()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 13:02:01 +02:00
Christian Brauner
f6370f2ac2
conf: use mount_fd() during console mounting
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 09:40:40 +02:00
Christian Brauner
af0cf9b759
conf: use mount_fd() in lxc_setup_dev_console()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 09:27:54 +02:00
Christian Brauner
84f8f9e470
conf: use mount_fd() helper when mounting ttys
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 09:20:22 +02:00
Christian Brauner
b370ffcf7e
mount_utils: add mount_fd()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 09:19:32 +02:00
Christian Brauner
d926c261b3
conf: stash pty_nr in struct lxc_terminal
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-30 09:07:50 +02:00
Stéphane Graber
cd7bd1fdd8
Merge pull request #3916 from brauner/2021-07-29.fixes
conf: move remaining setup before pivot root
2021-07-29 13:26:19 -04:00
Christian Brauner
6a2ca1b4dc
conf: move lxc_create_ttys() before pivot root
This is the last setup step that occured after pivot root.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 19:00:32 +02:00
Christian Brauner
4655bdd112
terminal: split out lxc_devpts_terminal() helper
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 18:58:46 +02:00
Stéphane Graber
85fdf33f4e
Merge pull request #3915 from brauner/2021-07-29.fixes
string_utils: cast __s64 to long long signed int
2021-07-29 12:42:39 -04:00
Christian Brauner
e39f333336
string_utils: cast __s64 to long long signed int
Link: https://launchpadlibrarian.net/550723147/buildlog_snap_ubuntu_focal_ppc64el_lxd-latest-edge_BUILDING.txt.gz
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 18:25:19 +02:00
Stéphane Graber
3f4530847b
Merge pull request #3914 from brauner/2021-07-29.devpts
devpts: move setup before pivot root
2021-07-29 12:20:23 -04:00
Christian Brauner
96a980e1af
conf: merge devpts setup and move before pivot root
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:54:46 +02:00
Christian Brauner
cb01e31126
terminal: don't use ttyname_r() for native terminal allocation
Since we can call that function from another mount namespace we need to
do this manually.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:49:17 +02:00
Christian Brauner
c146c54eee
conf: add and use mount_beneath_fd()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:49:17 +02:00
Christian Brauner
d27ae9992a
conf: update comment
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:41:00 +02:00
Christian Brauner
068534278e
conf: use a relative path in symlinkat()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:41:00 +02:00
Christian Brauner
42c0d0568f
conf: s/lxc_setup_devpts_parent/lxc_recv_devpts_from_child/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:41:00 +02:00
Christian Brauner
f30fc74d07
conf: attach devpts mount directly when new mount api can be used
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:40:57 +02:00
Christian Brauner
a32e275f25
conf: set source property for devpts
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:39:04 +02:00
Christian Brauner
87dfb724ea
conf: surface failures to setup console
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-29 15:36:21 +02:00
Stéphane Graber
9dcca2d5e0
Merge pull request #3912 from brauner/2021-07-28.devpts
conf: devpts rework
2021-07-28 16:48:18 -04:00
Christian Brauner
52da248213
Merge pull request #3913 from stgraber/master
Fix typos
2021-07-28 21:49:14 +02:00