upstart: Fix wrong stderr redirect

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
coverity: Try to make it happier with our array handling

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

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
drop create= from mount options (v2)

Otherwise mount may return -EINVAL if in-kernel super-block parser
objects (as is the case with ext4).

Changelog v2:
	also drop 'optional'
	specifically drop create=dir, not create=*
	fix order of arguments for memmove

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
doc: update for commit 69aa6655

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
gentoo: fix typo in config cross-reference comment

Signed-off-by: Eivind Uggedal <eivind@uggedal.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
cache whether 'optional' was in mntopts

after commit 4e4ca16158f91ac1271495638a4e62881169474e we are
checking for optional in mntopts after we forcibly remove it.
Cache whether we had it before removing it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Fix unprivileged networking

If we are unprivileged and have asked for a veth device, then create
a pipe over which to pass the veth names.

Network-related todos:
1. set mtu on the container side of veth device
2. set mtu in lxc-user-nic.  Note that this probably requires an
   update to the /etc/lxc/lxc-usernet file :(

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-checkconfig: Fix parsing on vserver kernels

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Set a reasonable fallback for get_rundir

If get_rundir can't find XDG_RUNTIME_DIR in the environment, it'll
attempt to build a path using ~/.cache/lxc/run/. Should that fail
because of missing $HOME in the environment, it'll then return NULL an
all callers will fail in that case.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
rundir: Fix the uid == 0 case

This makes get_rundir actually do what I meant it to do... for some
reason I missed that one in testing...

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
network: set mtu of unpriv veth to the bridge's mtu

That's to make sure that if the bridge has a higher than 1500
mtu, the new veth (defaulting to 1500) doesn't lower it.

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