Add missing include of signal.h

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

This op will be used on older kernels where container shutdown via reboot(2)
is not implemented and we use the utmp watching code.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
download: Fix previous change

The previous change to support http proxies only worked when http_proxy
was set... Instead add some detection code and only use :80 when using
http_proxy.

That's a bit of a workaround, but it's the only way I could find to get
GPG to work with http_proxy.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
templates: Make sure usual locations are in PATH

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
download: Use port-80 pool for gpg over http

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
tests: Pass http_proxy through sudo environment

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
cgmanager: only include CFLAGS and LDADD when needed

lxc-cgroup doesn't depend on cgmanager

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
change version to 1.0.0.beta4 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
log: Don't crash when name is NULL

This fixes a crash in lxc-autostart following the addition of
lxc_log_init as lxc-autostart doesn't use the name property.

Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
log: Drop trailing \n from log messages

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc_autostart: Update following shutdown() API change

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
add_device_node: act in a chroot

The goal is to avoid an absolute symlink in the guest redirecting
us to the host's /dev.  Thanks to the libvirt team for considering
that possibility!

We want to work on kernels which do not support setns, so we simply
chroot into the container before doing any rm/mknod.  If /dev/vda5
is a symlink to /XXX, or /dev is a symlink to /etc, this is now
correctly resolved locally in the chroot.

We would have preferred to use realpath() to check that the resolved
path is not changed, but realpath across /proc/pid/root does not
work as expected.

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

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