Commit Graph

5245 Commits

Author SHA1 Message Date
Stéphane Graber
b6a7263939 archlinux: Do DHCP on eth0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-10-13 14:32:03 -04:00
Christian Brauner
74cdd72366 Merge pull request #1226 from jirutka/alpine-shm
lxc-alpine: mount /dev/shm as tmpfs
2016-10-12 13:49:32 +02:00
Jakub Jirutka
48938fe71d
lxc-alpine: mount /dev/shm as tmpfs
Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
2016-10-12 13:33:27 +02:00
Christian Brauner
aa74ed7b96 Merge pull request #1225 from jiazhang0/master
log: sanity check the returned value from snprintf()
2016-10-12 11:49:57 +02:00
Lans Zhang
f6c796102a log: sanity check the returned value from snprintf()
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>
2016-10-11 09:28:08 +08:00
Christian Brauner
b8fc6b3671 Merge pull request #1224 from evgeni/python-utf8
mark the python examples as having utf-8 encoding
2016-10-08 19:18:17 +02:00
Evgeni Golov
59e8ed7637 mark the python examples as having utf-8 encoding
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>
2016-10-08 18:31:33 +02:00
Christian Brauner
fd5cf68167 Merge pull request #1223 from evgeni/unit-doc
add Documentation entries to lxc and lxc@ units
2016-10-08 15:02:03 +02:00
Evgeni Golov
6a27d555e7 add Documentation entries to lxc and lxc@ units
Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-10-08 14:09:17 +02:00
Serge Hallyn
fcb14ee840 Merge pull request #1171 from brauner/2016-09-06/detect_ramfs_rootfs
improve detect_ramfs_rootfs() and add test
2016-10-06 08:34:16 -05:00
Stéphane Graber
2d94f09fd1 Merge pull request #1217 from brauner/2016-09-29/lxc_checkconfig
tools: lxc-checkconfig conditionalize devpts check
2016-10-05 04:16:51 -04:00
Christian Brauner
7cde88f74d Merge pull request #1221 from stgraber/master
Define LXC_DEVEL to detect development releases
2016-10-04 19:12:55 +02:00
Stéphane Graber
d2d6b991b8 Define LXC_DEVEL to detect development releases
This can be used by downstreams to improve their "feature" checks.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-10-04 18:31:29 +02:00
Christian Brauner
873d48ce93
tools: lxc-checkconfig conditionalize devpts check
Only check for DEVPTS_MULTIPLE_INSTANCES on kernels < 4.7.

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-29 10:44:09 +02:00
Christian Brauner
afb4de25fc Merge pull request #1214 from roman-mueller/fix_centos_spelling
Fix spelling of CentOS in the templates
2016-09-28 11:15:53 +02:00
Roman Mueller
491a01cf7b Fix spelling of CentOS in the templates
Signed-off-by: Roman Mueller <roman.mueller@gmail.com>
2016-09-28 10:03:39 +02:00
Christian Brauner
24b9970e8c tests: add test for detect_ramfs_rootfs()
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-27 22:51:46 +02:00
Christian Brauner
fa454c8e3b utils: make detect_ramfs_rootfs() return bool
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-27 22:48:14 +02:00
Stéphane Graber
92281f0275 Merge pull request #1212 from brauner/2016-09-26/fix_lxc_deslashify
utils: lxc_deslashify() free memory
2016-09-26 20:38:37 -04:00
Christian Brauner
f85b16a104
utils: lxc_deslashify() free memory
Make sure we always free any memory that was allocated by the call to
lxc_normalize_path().

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-26 22:42:52 +02:00
Stéphane Graber
7be721c185 Merge pull request #1209 from brauner/2016-09-25/lxc_deslashify
2016 09 25/lxc deslashify
2016-09-26 16:00:40 -04:00
Christian Brauner
5d1f62b409 Merge pull request #1210 from d4s/altlinux-fix
Fix for ALTLinux container creation in all branches
2016-09-26 20:42:50 +02:00
Denis Pynkin
0b7c005e28
Fix for ALTLinux container creation in all branches
Use 'apt-conf' virtual package for ALTLinux default packages set

Signed-off-by: Denis Pynkin <denis_pynkin@epam.com>
2016-09-26 20:54:18 +03:00
Christian Brauner
1a514c157d
tests: add unit tests for lxc_deslashify()
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-26 19:41:37 +02:00
Christian Brauner
c56a9652d7
tools: lxc_deslashify() handle special cases
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-26 19:41:34 +02:00
Stéphane Graber
30498b9e1d Merge pull request #1207 from brauner/2016-09-25/fix_lxc_string_split
utils: fix lxc_string_split()
2016-09-25 14:45:22 -04:00
Christian Brauner
605ea1f73b
utils: fix lxc_string_split()
Make sure we don't return uninitialized memory.

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-25 17:20:25 +02:00
Christian Brauner
021eb12614 Merge pull request #1206 from cwoac/master
Fix null derefence if attach is called without access to any tty
2016-09-25 11:22:21 +02:00
Oliver Matthews
b9a24c4f2f Fix null derefence if attach is called without access to any tty
Signed-off-by: Oliver Matthews <oliver@codersoffortune.net>
2016-09-25 09:37:43 +01:00
Christian Brauner
0f73b621c4 Merge pull request #1204 from tych0/close-tty-on-restore
c/r: detatch from controlling tty on restore
2016-09-22 00:08:14 +02:00
Tycho Andersen
a7fb6043b9 c/r: detatch from controlling tty on restore
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-21 21:46:20 +00:00
Stéphane Graber
2b8640dfbf Merge pull request #1201 from brauner/2016-09-21/lxc_ls_no_spaces
tools: do not add trailing spaces on lxc-ls -1
2016-09-21 15:34:34 -04:00
Stéphane Graber
9c395c35de Merge pull request #1202 from brauner/2016-09-21/lxc_attach_no_new_priv_fix
tools: fix lxc-attach regression with -s USER
2016-09-21 15:33:45 -04:00
Stéphane Graber
5c01fd0b2c Merge pull request #1203 from brauner/2016-09-21/retrieve_mtu_from_bridge
2016 09 21/retrieve mtu from bridge
2016-09-21 15:32:00 -04:00
Christian Brauner
729e8bf685
conf: try to retrieve mtu from veth
When the mtu cannot be retrieved from netdev->link try from veth device.

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-21 21:07:24 +02:00
Christian Brauner
e9280f6590
conf: retrieve mtu from netdev->link
When mtu is not set, try to retrieve mtu from netdev->link.

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-21 20:56:03 +02:00
Christian Brauner
bd4307f0c1
tools: fix lxc-attach regression with -s USER
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-21 17:26:19 +02:00
Christian Brauner
27de259f33
tools: do not add trailing spaces on lxc-ls -1
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-09-21 09:15:14 +02:00
Christian Brauner
bb095bebd9 Merge pull request #1197 from ysbnim/master
Update Korean manuals
2016-09-20 11:35:53 +02:00
Sungbae Yoo
15f919b9cc doc: Add lxc.no_new_privs to Korean lxc.container.conf(5)
Update for commit 222ddc

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-09-20 18:10:33 +09:00
Stéphane Graber
651ef4efbb Merge pull request #1194 from tych0/cgroup-root-on-dump
Cgroup root on dump
2016-09-16 23:20:10 -04:00
Tycho Andersen
09e80d0cc4 c/r: check that cgroup_num_hierarchies > 0
Otherwise in the error case, we end up subtracting two from the
static_args, which would lead to a segfault :)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 20:26:31 -06:00
Tycho Andersen
a0c91fccd9 cgroup: drop cgroup_canonical_path
This is almost never the right thing to use, and we don't use it any more
anyway.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 15:19:19 -06:00
Tycho Andersen
6df334d158 cgroup: get rid of weird hack in cgfsng_escape
We initialized cgfsng in a strange way inside of its implementation of
escape so we could use it during checkpoint. Instead, the previous patch
does a hacky initialization in criu.c, and we can get rid of the hacks
elsewhere :)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 15:19:19 -06:00
Tycho Andersen
0ab5703fcf c/r: pass --cgroup-roots on checkpoint
CRIU has added support for passing --cgroup-root on dump, which we should
use (see the criu commit 07d259f365f224b32914de26ea0fd59fc6db0001 for
details). Note that we don't have to do any version checking or anything,
because CRIU just ignored --cgroup-root on checkpoint before, so passing it
is safe, and will result in correct behavior when a sufficient version of
CRIU is present.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 15:19:07 -06:00
Tycho Andersen
aeb3682ff6 utils: add lxc_deslashify
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 15:17:03 -06:00
Tycho Andersen
3666241644 cgroup: add new functions for interacting with hierachies
N.B. that these are only implemented in cgfsng, but,

15:28:28    tych0 | do we still use cgfs anywhere? or the cgm backend?
15:29:19 stgraber | not anywhere we care about

...I think that's okay.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 15:17:03 -06:00
Tycho Andersen
5f178bc983 c/r: fix typo in comment
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-09-16 15:17:03 -06:00
Stéphane Graber
127a74d7aa Merge pull request #1193 from hallyn/2016-09-16/thierry
lxc-create -t debian fails on ppc64el arch
2016-09-16 13:35:42 -04:00
Thierry Fauck
bfbf793616 lxc-create -t debian fails on ppc64el arch
Template catches arch from uname -m, but for ppc64el system, arch reports ppc64le
which doesn't match image repo.

Signed-off-by: Thierry Fauck <tfauck@free.fr>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2016-09-16 08:34:41 -05:00