- 24 Sep, 2017 5 commits
-
-
Christian Brauner authored
non-functional changes Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Closes #1800. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Closes #1800. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Closes #1800. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Closes #1800. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 10 Sep, 2017 6 commits
-
-
Christian Brauner authored
- replace lxc.network.[i].ipv4 with lxc.net.[i].ipv4.address - remove lxc.rootfs.backend lines Closes #1790. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
KATOH Yasufumi authored
* and fix a typo in English man Signed-off-by:KATOH Yasufumi <karma@jazz.email.ne.jp>
-
KATOH Yasufumi authored
* Update for commit 594d6e30 * and some improvements Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp>
-
LiFeng authored
In the past, if the console client exited, lxc_console_cb_con return 1. And the lxc_poll will exit, the process will wait at waitpid. At this moment, the process could not handle any command (For example get the container state LXC_CMD_GET_STATE or stop the container LXC_CMD_STOP.). I think we should clean the tty_state and return 0 in this case. So, we can use the lxc-console to connect the console of the container. And we will not exit the function lxc_polland we can handle the commands by lxc_cmd_process Reproducer prior to this commit: - open a new terminal, get the tty device name by command tty /dev/pts/6 - set lxc.console.path = /dev/pts/6 - start the container and the ouptut will print to /dev/pts/6 - close /dev/pts/6 - try an operation e.g. getting state with lxc-ls and lxc-ls will hang Closes #1787. Signed-off-by:
LiFeng <lifeng68@huawei.com> Acked-by:
Christian Brauner <christian.brauner@ubuntu.com>
-
Wolfgang Bumiller authored
The entire netdev is zeroed via memset() already. Unions and all. Signed-off-by:Wolfgang Bumiller <w.bumiller@proxmox.com>
-
Wolfgang Bumiller authored
Signed-off-by:Wolfgang Bumiller <w.bumiller@proxmox.com>
-
- 06 Sep, 2017 1 commit
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 05 Sep, 2017 11 commits
-
-
Stéphane Graber authored
doc: adapt + update
-
Christian Brauner authored
- lxc.id_map -> lxc.idmap - document lxc.cgroup.dir Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
conf: bugfixes
-
Christian Brauner authored
A bit of context: userns_exec_1() is only used to operate based on privileges for the user's own {g,u}id on the host and for the container root's unmapped {g,u}id. This means we require only to establish a mapping from: - the container root {g,u}id as seen from the host -> user's host {g,u}id - the container root -> some sub{g,u}id This function however was buggy. It relied on some pointer pointing to the same memory, namely specific idmap entries in the idmap list in the container's in-memory configuration. However, due to a stupid mistake of mine, the pointers to be compared pointed to freshly allocated memory. They were never pointing to the intended memory locations. To reproduce what I'm talking about prior to this commit simply place: chb:999:1000000000 chb:999:1 chb:1000:1 in /etc/sub{g,u}id then create a container which requests the following idmappings: lxc.idmap = u 0 999 999 lxc.idmap = g 0 999 1000000000 and start the container. What we *would expect* is for liblxc to establish the following mapping: newuidmap <pid> 0 999 999 newgidmap <pid> 0 999 1000000000 since all required mappings are present. Due to the buggy pointer comparisons what happened was: newuidmap <pid> 0 999 999 0 999 999 newgidmap <pid> 0 999 1000000000 0 999 1000000000 Let's fix this. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
We allocate pty {master,slave} file descriptors in the childs namespaces after we have setup devpts. After we have sent the pty file descriptors to the parent and set up the pty file descriptors under /dev/tty* and before we exec the init binary we need to delete these file descriptors in the child. However, one of my commits made the deletion occur before setting up the file descriptors under /dev/tty*. This caused a failures when trying to attach to the container's ttys since they werent actually configured although the file descriptors were available in the in-memory configuration of the parent. This commit reworks setting up tty such that deletion occurs after all setup has been performed. The commit is actually minimal but needs to also move all the functions into one place since they well now be called from "lxc_create_ttys()". Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Stéphane Graber authored
conf: record idmap that gets written
-
Christian Brauner authored
This will serve us well in the future! Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 04 Sep, 2017 9 commits
-
-
Stéphane Graber authored
start: document all handler fields
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Stéphane Graber authored
criu: add cmp_version()
-
Federico Briata authored
We cannot use strcmp(). Otherwise we incorrectly report e.g. that criu 2.12.1 is less than 2.8. Signed-off-by:
Federico Briata <federico-pietro.briata@cnhind.com> Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
-
Stéphane Graber authored
console: non-functional change
-
Stéphane Graber authored
conf: don't send ttys when none are configured
-
Christian Brauner authored
It is bad style to close an fd inside a function which didn't create it. Let's rather close it transparently in start.c. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Serge Hallyn authored
network: improvements + bugfixes
-
- 03 Sep, 2017 8 commits
-
-
Christian Brauner authored
Writes < PIPE_BUF will be atomic. PIPE_BUF is guaranteed to be 512 by POSIX and Linux guarantess 4096. Nothing we send around goes over this limit. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
I thought we could send all ttys at once but this limits the number of ttys users can use because of iovec_len restrictions. So let's sent them in batches of 2. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
lxc_mkifname() really doesn't need to allocate any memory. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Also move all functions to network.{c,h}. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Since find_line() was changed before count_entries() started counting lines wrong. It would report maximum reached before you actually reached your alloted maximum. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-