Commit Graph

9454 Commits

Author SHA1 Message Date
Christian Brauner
9ea99cf7e8
cgroups: update terminology II
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-03 13:01:40 +02:00
Christian Brauner
29a01c3742
cgroups: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-03 12:58:53 +02:00
Stéphane Graber
ffa6884056
Merge pull request #3469 from johanneskastl/20200630_Kastl_fix_gpg_option
templates/lxc-download.in: use GPG option "--receive-keys"
2020-07-01 08:44:06 -04:00
Johannes Kastl
409040e702
templates/lxc-download.in: use GPG option --receive-keys instead of --recv-keys
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
2020-07-01 07:09:09 +02:00
Stéphane Graber
5408652de4
Merge pull request #3468 from johanneskastl/20200630_Kastl_fix_shell_download_template
templates/lxc-download.in: fix wrong if-condition
2020-06-30 16:18:44 -04:00
Johannes Kastl
eb44984ae5
templates/lxc-download.in: make shellcheck happy
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
2020-06-30 19:18:21 +02:00
Johannes Kastl
18e18d4c31
templates/lxc-download.in: fix wrong if condition (use the result of the gpg command, not the result when executing the result of the gpg command)
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
2020-06-30 18:52:49 +02:00
Christian Brauner
f88d8e68b0
Merge pull request #3466 from alivenets/fix-no-new-privs
attach: set no_new_privs flag after LSM label
2020-06-30 10:18:01 +02:00
Alexander Livenets
6ce8e67825 attach: set no_new_privs flag after LSM label
In `start.c:1284`, no_new_privs flag is set after LSM label is set.
Also, in `lxc.container.conf` documentation it is written that:
```
Note that PR_SET_NO_NEW_PRIVS is applied after the container has
changed into its intended AppArmor profile or SElinux context.
```
This commit fixes the behavior of `lxc_attach` by moving
`PR_SET_NO_NEW_PRIVS` set logic after LSM for the process is configured;

Closes #3393

Signed-off-by: Alexander Livenets <a.livenets@gmail.com>
2020-06-30 00:54:36 +02:00
Stéphane Graber
7c8b10e515
Merge pull request #3465 from brauner/2020-06-19/clone_into_cgroup
clone_into_cgroup: fixes
2020-06-29 09:24:34 -04:00
Christian Brauner
0aff04e066
start: use __aligned_u64
Closes: Coverity 1465044.
Closes: Coverity 1465046.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-29 14:52:54 +02:00
Christian Brauner
84b66ced1d
start: initialize cgroup_fd
Fixes: Coverity 1465045.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-29 14:51:02 +02:00
Stéphane Graber
d5827bc003
Merge pull request #3464 from brauner/2020-06-19/clone_into_cgroup
lxc: support CLONE_INTO_CGROUP
2020-06-29 08:24:00 -04:00
Christian Brauner
f7176c3ea9
lxc: support CLONE_INTO_CGROUP
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-29 13:58:21 +02:00
Stéphane Graber
3a9018bba7
Merge pull request #3463 from brauner/2020-06-26/fixes
confile: handle overflow in lxc.time.offset.{boot,monotonic}
2020-06-26 09:33:03 -04:00
Stéphane Graber
11e5f16ae0
Merge pull request #3462 from tenforward/japanese
Update Japanese lxc.container.conf(5)
2020-06-26 08:45:55 -04:00
Christian Brauner
f1c4343929
start: preserve time namespace
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-26 10:40:52 +02:00
Christian Brauner
07f89c1e0e
confile: handle overflow in lxc.time.offset.{boot,monotonic}
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-26 10:08:32 +02:00
KATOH Yasufumi
bb144af237 doc: Add lxc.time.offset.* to Japanese lxc.container.conf(5)
and fix a type in English man page.
Update for commit 7fb5a8dfd2

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2020-06-26 14:24:28 +09:00
KATOH Yasufumi
6fcaba0559 doc: Add veth vlan bridge options to Japanese lxc.container.conf(5)
Update for commit a789ca4c24

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2020-06-26 14:10:03 +09:00
Stéphane Graber
b2ff0ccc7c
Merge pull request #3461 from brauner/2020-06-25/time_namespace
time namespace support
2020-06-25 20:15:50 -04:00
Christian Brauner
7fb5a8dfd2
doc: add lxc.time.offset.{boot,monotonic}
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-26 01:03:24 +02:00
Christian Brauner
b1248e473b
api: add time_namespace extension
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-26 01:03:24 +02:00
Christian Brauner
70fd7fc9ba
lxc: add time namespace support
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-26 01:03:24 +02:00
Stéphane Graber
f0a3c722e6
Merge pull request #3460 from brauner/2020-06-25/fixes
commands: don't flood logs
2020-06-25 12:14:41 -04:00
Christian Brauner
769b88ea06
commands: don't flood logs
We're ignoring commands that we don't know about. They used to be fatal. Not
anymore.

Closes: #3459.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-25 16:32:33 +02:00
Christian Brauner
44f0f0ab6e
Merge pull request #3458 from stgraber/master
lxc-net: Set broadcast
2020-06-24 18:43:22 +02:00
Stéphane Graber
dfc6654e3c
lxc-net: Set broadcast
Closes #3457

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-23 19:24:54 -04:00
Christian Brauner
baf6d38bd9
Merge pull request #3456 from brauner/2020-06-23/lxc_stop_fixes
lxccontainer: fix non-blocking container stop
2020-06-23 11:45:23 +02:00
Robert Vogelgesang
60cd509114
lxccontainer: fix non-blocking container stop
Stopping a lxc container with without waiting on it was broken in master. This
patch fixes it.

Signed-off-by: Robert Vogelgesang <vogel@folz.de>
2020-06-23 11:08:09 +02:00
Stéphane Graber
91dd15a426
Merge pull request #3454 from brauner/master
tree-wide: variable naming update
2020-06-19 19:08:19 -04:00
Christian Brauner
992a0a6799
test: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
f1d358b08a
doc: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
41e1294552
CODING_STYLE: adapt code example
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
a143f4a563
openpty: adapt variable naming
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
8ed01f3c00
Merge pull request #3453 from stgraber/master
network: Rename primary to master
2020-06-18 17:56:52 +02:00
Stéphane Graber
0dc9a1425e
network: Rename primary to master
The previous change made things confusing by impliying there may be a
secondary when VLAN/IPVLAN/bridge members can only have a single parent
device.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-18 10:28:57 -04:00
Stéphane Graber
3d88831c53
Revert "nl: fix memory leak"
This reverts commit 9d05339487.

This causes a double-free as the variable is already using __do_free.

Closes #3452

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-18 10:22:44 -04:00
Christian Brauner
2410ff119c
tree-wide: use "primary" in networking code
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-18 10:06:55 +02:00
Christian Brauner
9e61fb1f70
tree-wide: wipe references to questionable apis from our public logs
We can't do anything about the established kernel API but we can at least not
propagate the terminology.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-18 10:05:10 +02:00
Christian Brauner
cecf3e8368
tree-wide: use "ptmx" and "pts" as terminal terms
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-17 23:58:59 +02:00
Christian Brauner
ce755129a9
Merge pull request #3449 from gaurav1086/nl_fix_mem_leak
nl: fix memory leak
2020-06-17 23:15:25 +02:00
Christian Brauner
92eeb4ea6b
Merge pull request #3450 from gaurav1086/containertests_fix_null_ptr_deref
containertests: fix null pointer defereference
2020-06-14 09:28:39 +02:00
Gaurav Singh
3815ebccdb containertests: fix null pointer defereference
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-06-13 19:15:50 -04:00
Gaurav Singh
9d05339487 nl: fix memory leak
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-06-13 14:06:04 -04:00
Stéphane Graber
ebe4f04eb6
Merge pull request #3446 from brauner/2020-06-10/fixes_2
conf: kill old chown_mapped_root()
2020-06-11 13:54:05 -04:00
Christian Brauner
472a2ff953
lxccontainer: remove pointless string duplication
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:24:21 +02:00
Christian Brauner
6e1a327aba
conf: kill old chown_mapped_root()
It's now a wrapper around userns_exec_mapped_root() which allows us to avoid
fork() + exec() lxc-usernsexec makes things way nicer to test with ASAN etc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:24:21 +02:00
Christian Brauner
2e8013f9f1
conf: add some more logging to userns_exec_mapped_root()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:24:21 +02:00
Christian Brauner
8053a085e0
conf: always use target_fd in userns_exec_mapped_root()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:19:31 +02:00