Otherwise a container with a non-standard configuration file
can be started but not attached to.
Fixes the following case:
# lxc-start -n ct -f /different/path/my.config
# lxc-attach -n ct
Error: container ct is not defined
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This allows us to avoid using relative includes which is cleaner in the long
run when we create subdirectories for other components of liblxc.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
To activate it specify lxc.syslog = <afacility>
For now the available facilities are: daemon, local[0-7] others will be
rejected
syslog got only activated after the function that checks for inheritance
of fd is passed in order to make sure the syslog fd is not inherited
and prevent the creation of the fd is any log have been issued during
the checks (which would end up in an infinite loop)
Signed-off-by: Fatih ACAR <fatih.acar@gandi.net>
Signed-off-by: Ahmed Amamou <ahmed@gandi.net>
Signed-off-by: Baptiste Daroussin <bapt@gandi.net>
Signed-off-by: William Dauchy <william@gandi.net>
This fixes a double free corruption on container-requested
reboots when lxc_spawn() fails before receiving the ttys, as
lxc_fini() (part of __lxc_start()'s cleanup) calls
lxc_delete_tty().
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This reverts commit 2579641608, reversing
changes made to 813d7f1453.
Contrary to what we suspected the android build errors were not caused by
missing wrong relative include paths. Rather, they were caused by autoconf.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
lxc-checkpoint will fail because process createdy by lxc-attach has
incorrect cgroup ns. It needs to use "setns" instead of "unshare"
to set cgroup ns.
Signed-off-by: Chen Haiquan <oc@yunify.com>
Fixes android build error:
bdev/bdev.c: In function 'detect_fs':
bdev/bdev.c:686:2: error: implicit declaration of function 'getline' [-Werror=implicit-function-declaration]
while (getline(&line, &linelen, f) != -1) {
^
Signed-off-by: Christian Brauner <cbrauner@suse.de>
This allows installing to different locations and using
the lxc.pc to build using the generated includedir and
libdir.
Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Both functions advertise that they return true when strncmp() == 0 and false
when strncmp() != 0 but so far they returned the exact opposite.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
Fixes build failures on arm:
criu.c: In function ‘exec_criu’:
criu.c:310:4: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Werror=format=]
ret = sprintf(ghost_limit, "%lu", opts->user->ghost_limit);
^
In file included from criu.c:42:0:
log.h:285:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Werror=format=]
struct lxc_log_locinfo locinfo = LXC_LOG_LOCINFO_INIT; \
^
criu.c:312:5: note: in expansion of macro ‘ERROR’
ERROR("failed to print ghost limit %lu", opts->user->ghost_limit);
^
Signed-off-by: Christian Brauner <cbrauner@suse.de>
This is required by systemd to cleanly shutdown. Other init systems should not
have SIGRTMIN+3 in the blocked signals set.
Signed-off-by: Christian Brauner <cbrauner@suse.de>