doc: add lxc.console.logpath to Japanese lxc.container.conf(5)

Update for commit 96f15ca

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
coverity: don't use newname after null check

Actually, get rid of the temporary variables, and set newname
and lxcpath to usable values if they were NULL.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
coverity: malloc the right size for btrs_node tree

We were allocating sizeof(tree) instead of sizeof(*tree).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-test-unpriv: test lxc-clone -s

This would have caught a regression in Ubuntu's 3.16 kernel.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
introduce --with-distro=raspbian

Raspberry Pi kernel finally supports all the bits required by LXC [1]

This patch makes "./configure --with-distro=raspbian" to install lxcbr0
based config file and upstart jobs.
Also src/lxc/lxc.net now checks the existence of the lxc-dnsmasq user
(and fallbacks to dnsmasq)

RPI users still need to pass
"MIRROR=http://archive.raspbian.org/raspbian/" parameter to lxc-create
to pick the correct packages

MIRROR=http://archive.raspbian.org/raspbian/ lxc-create -t debian -n rpi

[1] https://github.com/raspberrypi/linux/issues/176

stable-1.0: Cherry-picked from master minus the lxc-net change as
lxc-net isn't available in LXC 1.0.x. Instead it is assumed that the
distribution will take care of setting up the network (lxcbr0 in this
case).

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
cgmanager get/set: clean up child (v2)

(Thanks, Dwight, this one look right?)

Make sure we reap our child at cgm_{s,g}et.

Changelog: Fix change in behavior on empty read from the do_cgm_get()
           helper that was spotted by Dwight.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
chmod container dir to 0770

This prevents u2 from going into /home/u1/.local/share/lxc/u1/rootfs
and running setuid-root applications to get write access to u1's
container rootfs.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
doc: language correction

Signed-off-by: Lars Wikberg <lars.wikberg@anvia.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Add extra debugging

This is an hybrid between Micahel's original patch and me making the new
debugging statements look like our existing ones.

Signed-off-by: "Micahel J. Evans" <mjevans1983@gmail.com>
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Fix typo in the previous commit...

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Revert "chmod container dir to 0770"

This commit broke the testsuite for unprivileged containers as the
container directory is now 0750 with the owner being the container root
and the group being the user's group, meaning that the parent user can
only enter the directory, not create entries in there.

This reverts commit c86da6a3ac517b78e6f710df7efe2f51d153b73c.
doc: Fix Japanese translation of lxc.container.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
do_mount_entry: add nexec, nosuid, nodev, rdonly flags if needed at remount

See http://lkml.org/lkml/2014/8/13/746 and its history.  The kernel now refuses
mounts if we don't add ro,nosuid,nodev,noexec flags if they were already there.

Also use the newly found info to skip remount if unneeded.  For background, if
you want to create a read-only bind mount, then you must first mount(2) with
MS_BIND to create the bind mount, then re-mount(2) again to get the new mount
options to apply.  So if this wasn't a bind mount, or no new mount options were
introduced, then we don't do the second mount(2).

null_endofword() and get_field() were not changed, only moved up in
the file.

(Note, while I can start containers inside a privileged container with
this patch, most of the lxc tests still fail with the kernel in question;
Andy's patch seems to still be needed - a kernel with which is available
at https://launchpad.net/~serge-hallyn/+archive/ubuntu/userns-natty
ppa:serge-hallyn/userns-natty)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
tests: Call sync before testing a shutdown

This should avoid tests failure when the machine running the tests has
either very slow disks or a lot of data waiting to be flushed.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>