- 22 Apr, 2013 5 commits
-
-
Serge Hallyn authored
(found by coverity) Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
When using -P (lxcpath), the parameter path needs to be forwarded to the various commands being run but not used by the nested lxc-ls as it's relatively unlikely that both the host and the nested containers use a custom path. This isn't ideal but short of having a way to provide the container path for every single of the nesting (with potential unlimited depth), it's the best we can do. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
- Drop disabled entries from allowed devices list - Improve generated config layout a bit - Drop redundant uname call - Re-generate the SSH host keys on container creation Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 21 Apr, 2013 1 commit
-
-
Christian Bühler authored
According to "arch"'s manpage, it's identical to "uname -m". Some distros ship uname but don't ship arch, however all distros ship uname, therefore it makes sense to use "uname -m" whenever possible. Signed-off-by:
Christian Bühler <christian@cbuehler.de> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 18 Apr, 2013 6 commits
-
-
Stéphane Graber authored
This fixes a few issues uncovered by the recent C module fix. In lxc-start-ephemeral, the hwaddr code wasn't actually working. Replace by code that properly iterates through the network interfaces and sets a new MAC address for each entry. In the python overlay, catch the newly emitted KeyError when in set_config_item (or setting any previously unset variable would fail). Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Fixes a lot of issues found by a code review done by Barry Warsaw. Those include: - Wrong signature for getters - Various memory leaks - Various optimizations - More consistent return values - Proper exception handling Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Reported-by:
Barry Warsaw <barry@ubuntu.com> Acked-by:
Barry Warsaw <barry@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Richard Weinberger authored
Reimplement mkdir_p() such that it: ...handles relativ paths correctly. (currently it crashes) ...does not rely on dirname(). ...is not recursive. ...is shorter. ;-) Signed-off-by:
Richard Weinberger <richard@nod.at> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
This reverts commit 5a5c35c3. This commit was preventing startup of containers using lxc hooks and shutdown of all other containers, requiring the use of a good old kill -9 to get rid of lxc-start after a container shutdown. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
This reverts commit 8de41406. This commit was preventing container startup on my machine, making them all fail with various "No such file or directory" errors. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Richard Weinberger authored
Reimplement mkdir_p() such that it: ...handles relativ paths correctly. (currently it crashes) ...does not rely on dirname(). ...is not recursive. ...is shorter. ;-) Signed-off-by:
Richard Weinberger <richard@nod.at> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 17 Apr, 2013 3 commits
-
-
Richard Weinberger authored
If the process in the new namespace dies very early we have currently no chance to detect this. The parent process will just die due to SIGPIPE if it write to the fd used for synchronisation and nobody will notice the real cause of the problem. Install a SIGCHLD handler to detect the death. Later when the child does execve() to the init within the new namespace the handler will be disabled automatically. Signed-off-by:
Richard Weinberger <richard@nod.at> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Richard Weinberger authored
While we are here, fix the whitespace damage. Signed-off-by:
Richard Weinberger <richard@nod.at> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Richard Weinberger authored
There is no need to use nested functions voodoo. Signed-off-by:
Richard Weinberger <richard@nod.at> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 16 Apr, 2013 9 commits
-
-
Dwight Engen authored
The recent change to use strtok_r causes a build warning with this older gcc version, so initialize saveptr to NULL to quiet the compiler and unbreak the build. There was no warning with gcc 4.7.2 that I originally tested with. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
As Richard reported, dirname('//') returns //. But mkdir_p only stops when called with '/', resulting in infinite recursion when given a pathname '//foo/bar'. Reported-by:richard -rw- weinberger <richard.weinberger@gmail.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Bogdan Purcareata authored
This patch supports the scenario where a user wants to install a busybox container on a busybox host. When running the template, in order to change the root password, the template needs to do the chroot. On busybox-powered hosts, chroot is not part of the coreutils package - it's part of busybox. And the busybox implementation or chroot only works if it has /lib in the new root populated with the right binaries (or at least that's the solution I found to make it work). The temporarily bind-mounts /lib in the NEWROOT, chroots there, changes the password, goes back and unmounts. This set of operations is contained in a new MOUNT namespace, using the lxc-unshare call. Signed-off-by:
Bogdan Purcareata <bogdan.purcareata@freescale.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
pclose returns the exit status from wait, we need to check that to see if the script itself failed or not. Tested a script that returned 0, 1, and also one that did a sleep and then was killed by a signal. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Also check that we wrote the amount we expected to. The write on the pty is blocking but we could still get a short write on EINTR, so we should SYSERROR it. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
This makes it match the manpage and be consistent with lxc-execute Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 15 Apr, 2013 13 commits
-
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Unfortunately installing a working lxc-init is somewhat hairy and distro-dependent. So we skipped it before, but Coverity didn't like that, so just ifdef it out. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 12 Apr, 2013 3 commits
-
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
if sem_init fails, free what we mallocd. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-