- 17 Nov, 2016 17 commits
-
-
Tycho Andersen authored
When we read sizeof(buf) bytes here, we'd write off the end of the array, which is bad :) Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
The macros put a \n in for us, so let's not put another one in. Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
This also allows us to commonize some bits of the dup2 code. Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Wolfgang Bumiller authored
On shutdown we move physical network interfaces back to the host namespace and rename them afterwards as well as in the later lxc_network_delete() step. However, if the device had a name which already exists in the host namespace then the moving fails and so do the subsequent rename attempts. When the namespace ceases to exist the devices finally end up in the host namespace named 'dev<ID>' by the kernel. In order to avoid this, we do the moving and renaming in a single step (lxc_netdev_move_by_*()'s move & rename happen in a single netlink transaction). Signed-off-by:Wolfgang Bumiller <w.bumiller@proxmox.com>
-
Tycho Andersen authored
We need to log longer lines due to CRIU arguments. Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
We switched to --ext-mount-map auto because of "system" (liblxc) added mounts like the cgmanager socket that weren't in the config file. This had the added advantage that we could drop all the mount processing code, because we no longer needed an --ext-mount-map argument. The problem here is that mounts can move between hosts. While --ext-mount-map auto does its best to detect this situation, it explicitly disallows moves that change the path name. In LXD, we bind mount /var/lib/lxd/shmounts/$container to /dev/.lxd-mounts for each container, and so when a container is renamed in a migration, the name changes. --ext-mount-map auto won't detect this, and so the migration fails. We *could* implement mount rewriting in CRIU, but my experience with cgroup and apparmor rewriting is that this is painful and error prone. Instead, it is much easier to go back to explicitly listing --ext-mount-map arguments from the config file, and allow the source of the bind to change. We leave --ext-mount-map auto to catch any stragling (or future) system added mounts. I believe this should fix Launchpad Bug 1580765 Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Christian Brauner authored
When the container is already running our manpage promises to exit with 2. Let's make it so. Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Christian Brauner authored
Somehow this implementation of a cgroupfs backend decided to use the hierarchy numbers it detects in /proc/cgroups and /proc/self/cgroups as indices for the hierarchy struct. Controller numbering usually starts at 1 but may start at 0 if: a) the controller is not mounted on a cgroups v1 hierarchy; b) the controller is bound to the cgroups v2 single unified hierarchy; or c) the controller is disabled To avoid having to rework our fallback backend significantly, we should explicitly check for each controller if hierarchy[i] != NULL. Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Christian Brauner authored
If cgroupv2 is enabled either alone or together with legacy hierarchies /proc/self/cgroup can contain entries of the form: 0::/ These entries need to be skipped. Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Evgeni Golov authored
it's "list of columns", not "list of column" Signed-off-by:Evgeni Golov <evgeni@debian.org>
-
Evgeni Golov authored
Signed-off-by:Evgeni Golov <evgeni@debian.org>
-
Evgeni Golov authored
this is how it is shipped in Debian and Ubuntu Signed-off-by:Evgeni Golov <evgeni@debian.org>
-
Christian Brauner authored
And let's be on the safe side by NULLing free()ed variables. Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Evgeni Golov authored
Signed-off-by:Evgeni Golov <evgeni@debian.org>
-
Evgeni Golov authored
Closes: #502 Signed-off-by:Evgeni Golov <evgeni@debian.org>
-
Serge Hallyn authored
rather than waiting and later unsharing. This "makes the creation of a new cgroup early enough that the existing cgroup mounts are visible. Which means any fancy permission checks I dream will work on a future version of liblxc." This also includes what should be a tiny improvement regarding netns, though it's conceivable it'll break something. Remember that with new kernels we need to unshare netns after we've become the root user in the new userns, so that netns files are owned by that root. But we were passing the unfiltered handler->clone_flags to the original clone(). This just resulted in a temporary extra netns generation, but still worked since our target netns, which we passed our devices into, was created late enough. Signed-off-by:
Serge Hallyn <serge@hallyn.com> Signed-off-by:
"Eric W. Biederman" <ebiederm@xmission.com>
-
- 26 Oct, 2016 23 commits
-
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Tycho Andersen authored
This will never actually overflow, because %d is 32 bits and eth is 128 bytes long, but safety first :) Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Tycho Andersen authored
Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
We need this for calculating the name of unnamed interfaces in the config. But we also need to remember to increment it :) Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
--veth-pair has been deprecated as of 2.6, let's use the new --external instead. Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com>
-
Stéphane Graber authored
This should allow proper filtering of build flags for libraries and make it easier to use PIE/PIC. Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Po-Hsu Lin authored
Correct the backingstorage typo in lxc_copy. Signed-off-by:Po-Hsu Lin <po-hsu.lin@canonical.com>
-
Stéphane Graber authored
There are no personalities for s390x, so don't list itself as one. Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Jakub Jirutka authored
Signed-off-by:Jakub Jirutka <jakub@jirutka.cz>
-
roedie authored
Signed-off-by:Sander Klein <github@roedie.nl>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Christian Brauner authored
So far, users could only create overlay snapshots by specifying -B overlayfs and not with -B overlay. This adds support for -B overlay. Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@canonical.com>
-
Po-Hsu Lin authored
Make release selection more flexible. Update the KNOWN_RELEAES list, add yakkety and remove vivid. Signed-off-by:Po-Hsu Lin <po-hsu.lin@canonical.com>
-
Jafar Al-Gharaibeh authored
lxc_strerror() was dropped long time ago, in 2009 to be exact. Related commit: https://github.com/lxc/lxc/commit/7cee8789514fb42d6a48d50b904e24284f5526e3Signed-off-by:
Jafar Al-Gharaibeh <to.jafar@gmail.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Jakub Jirutka authored
Signed-off-by:Jakub Jirutka <jakub@jirutka.cz>
-
Lans Zhang authored
The returned value from snprintf() should be checked carefully. This bug can be leveraged to execute arbitrary code through carefully constructing the payload, e.g, lxc-freeze -n `python -c "print 'AAAAAAAA' + 'B'*959"` -P PADPAD -o /tmp/log This command running on Ubuntu 14.04 (x86-64) can cause a segment fault. Signed-off-by:Lans Zhang <jia.zhang@windriver.com>
-
Evgeni Golov authored
this allows running them also under Python2, which otherwise would choke on Stéphane's name and error out with SyntaxError: Non-ASCII character '\xc3' in file … Signed-off-by:Evgeni Golov <evgeni@debian.org>
-