Fix return value of userns_exec_1

Instead of always returning -1 and call SYSERROR when the child returns
non-zero. Have userns_exec_1 always return the return value from the
function it's calling and let the caller do the error handling (as is
already done by its only caller).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lxccontainer.c: check lxc_conf before referance haltsignal

If we start container with rcfile(see comments in lxc_start.c), it
is possible that we have no config file in /usr/local/var/lib/lxc.
So when we try lxc_stop, lxc_container_new will not load any config
so we'll get c->lxc_conf = NULL.

In that case, we'll get Segmentation fault in lxcapi_shutdown, a
simple check would fix this.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Always try to create lxcpath

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
debian: Support ssh host keys regeneration

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
ubuntu: Fix path to openssh-server's postinst

The path isn't relative to @LOCALSTATEDIR@

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-download: POSIX doesn't specify -f for chown

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-download: Fix wrong option parsing

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