Commit Graph

494 Commits

Author SHA1 Message Date
Christian Brauner
c91e492a17
gcc: add -Warray-bounds, -Wrestrict, -Wreturn-local-addr, -Wstringop-overflow
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-05 10:16:29 -04:00
Christian Brauner
0baff7b7f5
conf: support console setup on containers without rootfs
This depends on the new mount api.

Closes #3164.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-04 22:28:47 -04:00
Stéphane Graber
eaf3c66b93
Release LXC 4.0.2
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-04-16 13:32:29 -04:00
Christian Brauner
378b64054c
configure: fix coverity builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-04-16 13:31:37 -04:00
Christian Brauner
04a7c46e1f
travis: coverity gets confused about the %m printf extension in glibc
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-04-15 17:13:16 -04:00
Stéphane Graber
98613f618b
Release LXC 4.0.1
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-04-06 15:14:40 -04:00
Stéphane Graber
a8565bb4aa
Release LXC 4.0.0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-03-24 16:35:48 -04:00
Christian Brauner
fef909cf62
make dist: add missing files
deleted:    CODING_STYLE.md
deleted:    LICENSE.GPL2
deleted:    LICENSE.LGPL2.1
deleted:    README.md
deleted:    coccinelle/exit.cocci
deleted:    coccinelle/run-coccinelle.sh
deleted:    coccinelle/while-true.cocci
deleted:    doc/api-extensions.md
deleted:    src/tests/lxc-test-exit-code
deleted:    src/tests/travis.sh

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-03-24 20:37:00 +01:00
Christian Brauner
7fa9063089
file_utils: handle libcs without fmemopen()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-03-10 17:44:56 +01:00
Christian Brauner
b3ed206162
cgroups: honor lxc.cgroup.pattern if set explicitly
Link: https://discuss.linuxcontainers.org/t/lxc-cgroup-pattern-is-not-being-honored
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-02-28 11:07:39 +01:00
Kirill Petrov
4ba0393577 cgroups: fix default cgroup pattern
Signed-off-by: Kirill Petrov <yakutskkirill@mail.ru>
2020-01-27 11:51:36 +03:00
Christian Brauner
384db5d761
travis: enable -fsanitize=undefined
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-23 22:12:09 +01:00
Christian Brauner
68a9e3ebcb
configure: enable -Wunused-but-set-variable
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 17:07:25 +01:00
Christian Brauner
bf6519892e
cgroups: add cgroup2 device controller support
Add a bpf-based device controller implementation.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-11-29 17:10:13 +01:00
Fabrice Fontaine
226205f0c5 configure.ac: fix build on toolchain without SSP
Commit 3b5a0eebd4 reverted
3aa7271157 resulting in lxc being unable
to be built on toolchain without SSP support

Fixes:
 - http://autobuild.buildroot.org/results/57945f54ffbc5c8764b6891a4516c4907e56ab97

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-11-11 22:55:36 +01:00
Caio B. Silva
d12860c00b update obsolete functions
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
2019-10-07 10:04:29 -03:00
Caio B. Silva
b2963bf912 allow users to configure the option --enable-feature or --with-package, if an option is given run shell commands action-if-given
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
2019-09-30 11:04:17 -03:00
Caio B. Silva
f756a3501a Set minimun autoconf version to 2.69 and change obsolete function AC_HELP_STRING for AS_HELP_STRING
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
2019-09-27 13:35:43 -03:00
KATOH Yasufumi
6da6d73e44 doc: Add Japanese pam_cgfs(8) man page
* translate pam_cgfs(8)
* support --{enable,disable}-{commands,tools} in doc/ja

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2019-09-20 01:15:12 +09:00
Venkata Harshavardhan Reddy Allu
a98ad25d3a doc: add man page for pam_cgfs
Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2019-09-18 18:38:23 +05:30
Stéphane Graber
5c338ef44e
Re-enable devel flag
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-07-22 18:42:42 -04:00
Stéphane Graber
ad48c77c50
Release LXC 3.2.1
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-07-22 18:32:29 -04:00
Stéphane Graber
65123ff553
Release LXC 3.2.0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-07-22 18:24:40 -04:00
Wolfgang Bumiller
4a094eec4a seccomp: update notify api
The previous API doesn't reflect the fact that
`seccomp_notif` and `seccomp_notif_resp` are allocatd
dynamically with sizes figured out at runtime.

We now query the sizes via the seccomp(2) syscall and change
`struct seccomp_notify_proxy_msg` to contain the sizes
instead of the data, with the data following afterwards.

Additionally it did not provide a convenient way to identify
the container the message originated from, for which we now
include a cookie configured via `lxc.seccomp.notify.cookie`.

Since we currently always send exactly one request and await
the response immediately, verify the `id` in the client's
response.

Finally, the proxy message's "version" field is removed, and
we reserve 64 bits in its place.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-07-09 12:25:10 +02:00
Serge Hallyn
fa2bb6ba53 Switch from gnutls to openssl for sha1
The reason for this is because openssl can be statically linked
against, gnutls cannot.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2019-06-13 22:19:27 -05:00
Stéphane Graber
76b65b40c2
Merge pull request #3037 from brauner/master
seccomp: align with upstream libseccomp
2019-06-11 17:43:10 -04:00
Christian Brauner
da9c8317e8
seccomp: s/seccomp_notif_get_fd/seccomp_notify_fd/g
Align with upstream libseccomp.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-06-11 23:27:33 +02:00
Christian Brauner
d4df64143e
configure: remove additional comma
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-05-21 15:58:03 +02:00
Christian Brauner
4e900c18a7
configure: handle checks when cross-compiling
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-05-15 15:44:36 +02:00
Rachid Koucha
720bbb3118
Config: check for %m availability
GLIBC supports %m to avoid calling strerror(). Using it saves some code space.
==> This check will define HAVE_M_FORMAT to be use wherever possible (e.g. log.h)

Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
2019-05-13 13:13:18 +02:00
Christian Brauner
cdb2a47f9b
seccomp: SECCOMP_RET_USER_NOTIF support
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-04-25 21:35:28 +02:00
Christian Brauner
e7d7f2686a
configure: s/LDLAGS/LDFLAGS/
I apparently cannot spell.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-04-17 19:12:07 +02:00
Christian Brauner
565c4427e2
hardening: enable address sanitizer build
This adds --{disable,enable}-asan. It is disabled by default.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-03-12 21:01:02 +01:00
Christian Brauner
e74d1fd9f3
compiler: -fexceptions hardening
This hardens multi-threaded C. Without it, the implementation of thread
cancellation handlers (introduced by pthread_cleanup_push) uses a completely
unprotected function pointer on the stack. This function pointer can simplify
the exploitation of stack-based buffer overflows even if the thread in question
is never canceled.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-03-11 23:36:02 +01:00
Christian Brauner
a40093c6f7
compiler: -pipe
Avoid temporary files, speeding up builds.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-03-11 23:34:18 +01:00
Christian Brauner
c9248f7162
compiler: -fasynchronous-unwind-tables hardening
Increased reliability of backtraces.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-03-11 23:31:27 +01:00
Christian Brauner
6400238d08
CVE-2019-5736 (runC): rexec callers as memfd
Adam Iwaniuk and Borys Popławski discovered that an attacker can compromise the
runC host binary from inside a privileged runC container. As a result, this
could be exploited to gain root access on the host. runC is used as the default
runtime for containers with Docker, containerd, Podman, and CRI-O.

The attack can be made when attaching to a running container or when starting a
container running a specially crafted image.  For example, when runC attaches
to a container the attacker can trick it into executing itself. This could be
done by replacing the target binary inside the container with a custom binary
pointing back at the runC binary itself. As an example, if the target binary
was /bin/bash, this could be replaced with an executable script specifying the
interpreter path #!/proc/self/exe (/proc/self/exec is a symbolic link created
by the kernel for every process which points to the binary that was executed
for that process). As such when /bin/bash is executed inside the container,
instead the target of /proc/self/exe will be executed - which will point to the
runc binary on the host. The attacker can then proceed to write to the target
of /proc/self/exe to try and overwrite the runC binary on the host. However in
general, this will not succeed as the kernel will not permit it to be
overwritten whilst runC is executing. To overcome this, the attacker can
instead open a file descriptor to /proc/self/exe using the O_PATH flag and then
proceed to reopen the binary as O_WRONLY through /proc/self/fd/<nr> and try to
write to it in a busy loop from a separate process. Ultimately it will succeed
when the runC binary exits. After this the runC binary is compromised and can
be used to attack other containers or the host itself.

This attack is only possible with privileged containers since it requires root
privilege on the host to overwrite the runC binary. Unprivileged containers
with a non-identity ID mapping do not have the permission to write to the host
binary and therefore are unaffected by this attack.

LXC is also impacted in a similar manner by this vulnerability, however as the
LXC project considers privileged containers to be unsafe no CVE has been
assigned for this issue for LXC. Quoting from the
https://linuxcontainers.org/lxc/security/ project's Security information page:

"As privileged containers are considered unsafe, we typically will not consider
new container escape exploits to be security issues worthy of a CVE and quick
fix. We will however try to mitigate those issues so that accidental damage to
the host is prevented."

To prevent this attack, LXC has been patched to create a temporary copy of the
calling binary itself when it starts or attaches to containers. To do this LXC
creates an anonymous, in-memory file using the memfd_create() system call and
copies itself into the temporary in-memory file, which is then sealed to
prevent further modifications. LXC then executes this sealed, in-memory file
instead of the original on-disk binary. Any compromising write operations from
a privileged container to the host LXC binary will then write to the temporary
in-memory binary and not to the host binary on-disk, preserving the integrity
of the host LXC binary. Also as the temporary, in-memory LXC binary is sealed,
writes to this will also fail.

Note: memfd_create() was added to the Linux kernel in the 3.17 release.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Co-Developed-by: Alesa Sarai <asarai@suse.de>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-11 13:59:21 +01:00
Christian Brauner
d0afbad9a4
compiler: -Wnested-externs hardening
Warn if an extern declaration is encountered within a function.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-06 00:04:04 +01:00
Christian Brauner
a30c52acb7
compiler: -Wdate-time hardening
Warn when macros __TIME__, __DATE__ or __TIMESTAMP__ are encountered as
they might prevent bit-wise-identical reproducible compilations.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:49:48 +01:00
Christian Brauner
fcfce08aba
compiler: -Werror=shift-overflow=2 hardening
Warn about left shift overflows. This warning is enabled by default in
C99 and C++11 modes (and newer).

-Wshift-overflow=2
This warning level also warns about left-shifting 1 into the sign bit,
unless C++14 mode (or newer) is active.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:48:32 +01:00
Christian Brauner
463bee7b8d
compiler: -Werror=shift-count-overflow hardening
Warn if shift count >= width of type.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:47:31 +01:00
Christian Brauner
3b5a0eebd4
compiler: fix -fstack-protector-strong
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:44:20 +01:00
Christian Brauner
64871d419d
compiler: -fdiagnostics-show-option
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:26:13 +01:00
Christian Brauner
a703da6c84
compiler: -Werror=overflow hardening
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:26:00 +01:00
Christian Brauner
4ccb887813
compiler: -Wendif-labels hardening
Do not warn whenever an #else or an #endif are followed by text.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 23:15:05 +01:00
Christian Brauner
5573349673
compiler: set -Wimplicit-fallthrough to 5
-Wimplicit-fallthrough=5 doesn’t recognize any comments as fallthrough
comments, only attributes disable the warning.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:31 +01:00
Christian Brauner
d07545c7da
compiler: -Wformat=2 hardening
Enable -Wformat plus additional format checks. Currently equivalent to
-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:31 +01:00
Christian Brauner
42a2ab35f4
compiler: -Werror=incompatible-pointer-types
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:31 +01:00
Christian Brauner
13311d70fe
compiler: -Werror=return-type hardening
Warn whenever a function is defined with a return type that defaults to
int. Also warn about any return statement with no return value in a
function whose return type is not void (falling off the end of the
function body is considered returning without a value).

For C only, warn about a return statement with an expression in a
function whose return type is void, unless the expression type is also
void. As a GNU extension, the latter case is accepted without a warning
unless -Wpedantic is used.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:31 +01:00
Christian Brauner
e3b4674d44
compiler: -Wsuggest-attribute=noreturn hardening
Warn about functions that might be candidates for attributes pure, const
or noreturn or malloc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:30 +01:00
Christian Brauner
30462b9144
compiler: -Wfloat-equal hardening
Warn if floating-point values are used in equality comparisons.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:30 +01:00
Christian Brauner
f03f7b5ce5
compiler: -Winit-self hardening
Warn about uninitialized variables that are initialized with themselves.
Note this option can only be used with the -Wuninitialized option.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:30 +01:00
Christian Brauner
11af5f2ba1
compiler: -Wold-style-definition hardening
Warn if an old-style function definition is used. A warning is given
even if there is a previous prototype.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:30 +01:00
Christian Brauner
cc0c3a0612
compiler: -Wmissing-include-dirs hardening
Warn if a user-supplied include directory does not exist.

This already surfaced a bug that is fixed by this commit.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:30 +01:00
Christian Brauner
fb3b3ef484
compiler: -Wlogical-op hardening
Warn about suspicious uses of logical operators in expressions.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-02-05 22:36:30 +01:00
Stéphane Graber
8465a7f49e
Re-enable lxc_devel
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-12-13 18:20:10 -05:00
Stéphane Graber
4dcd858b92
Release LXC 3.1.0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-12-13 18:12:56 -05:00
Fabrice Fontaine
3aa7271157 configure.ac: fix build without stack-protector
Compiler based hardening (including -fstack-protector-strong) are
enabled since version 3.0.3 and
2268c27754

However, some compilers could missed the needed library (-lssp or
-lssp_nonshared) at linking step so use ax_check_link_flag instead of
ax_check_compile_flag

Fixes:
 - http://autobuild.buildroot.org/results/0b90e7dca2984652842832a41abad93ac49a9b86

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-12-04 21:13:47 +01:00
Christian Brauner
2268c27754
autotools: compiler based hardening
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-20 00:22:18 +02:00
Christian Brauner
a3bb6b8ed9
autools: use -fno-strict-aliasing
The gcc implementation and the C standard are not to be considered sane
in this respect. We don't want to risk reordering of writes when the
compiler incorrectly *thinks* two types do not alias each other.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-12 21:23:07 +02:00
Christian Brauner
da5efb6f76
netns_ifaddrs: handle IFLA_STATS{64} correctly
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 12:29:19 +02:00
Christian Brauner
e6fe24e134
autotools: support -z relro and -z now
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 22:58:20 +02:00
Christian Brauner
b25291da14
utils: add lxc_setup_keyring()
Allocate a new keyring if we can to prevent information leak.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 13:41:14 +02:00
Christian Brauner
c73fbad129
configure: fix -Wimplicit-fallthrough check
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 13:41:14 +02:00
Stéphane Graber
810fd51c92
Merge pull request #2618 from CameronNemo/lxcmountroot
apparmor: account for specified rootfs path (closes #2617)
2018-09-25 14:46:21 -04:00
Christian Brauner
246736be38
autotools: support -Wstrict-prototypes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-23 20:22:41 +02:00
Christian Brauner
6ce39620fd
autotools: support -Wcast-align
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-23 20:22:41 +02:00
Christian Brauner
23b44c365e
autotools: fix wrong AX_CHECK_COMPILE_FLAG test
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-21 23:45:33 +02:00
Christian Brauner
292b3910d5
cgroups: switch to lxc.payload as default pattern
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-21 16:47:03 +02:00
Christian Brauner
cf0fd972be
autotools: add -Wimplicit-fallthrough
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-21 15:24:14 +02:00
Cameron Nemo
b19c5d1237 apparmor: account for specified rootfs path (closes #2617)
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
2018-09-20 15:56:05 -07:00
2xsec
5c7bfc0231
log: support dlog
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-09-11 16:04:25 +09:00
Fabrice Fontaine
218e814412 lxc: fix build with --disable-werror
Fix #2592 by defining -Wvla -std=gnu11 even if --disable-werror is set
As -std=gnu11 is always set, bump requirement on gcc from 4.6 to 4.7
(see https://gcc.gnu.org/projects/cxx-status.html#cxx11)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-09-08 21:09:20 +02:00
Christian Brauner
8bc781b419
configure: reorder header checks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-28 20:10:46 +02:00
Christian Brauner
d029e1defd
Makefile: conditionalize ifaddrs.h inclusion
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-23 14:06:54 +02:00
Christian Brauner
81c76cff14
autotools: add --{disable,enable}-thread-safety
Fail the build if --enable-thread-safety is passed and the environment cannot
guarantee thread-safety.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 13:41:43 +02:00
Christian Brauner
607e3fcae1
log: handle strerror_r() versions
Closes #2563.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 13:41:41 +02:00
Christian Brauner
9b5724cd58
autotools: check if compiler is new enough
We line up with the Linux kernel and won't support any compiler under 4.6.
Additionally, we also require at least gnu99 so this is due anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 00:04:19 +02:00
Christian Brauner
81a56e8029
autotools: default to -Wvla -std=gnu11
We can't really support anything less than gcc-4.8 anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-26 16:38:42 +02:00
Wolfgang Bumiller
1800f92473 apparmor: profile generation
This copies lxd's apparmor profile generation. This tries to
detect features such as cgroup namespaces, apparmor
namespaces and stacking support, and has profile parts
conditionally for unprivileged containers.

This introduces the following changes to the configuration:
  lxc.apparmor.profile = generated
    The fixed value 'generated' will cause this
    functionality to be used, otherwise there should be no
    functional changes happening unless specifically
    requested with the next key:
  lxc.apparmor.allow_nesting
    This is a boolean which, if enabled, causes the
    following changes: When generated apparmor profiles are
    used, they will contain the necessary changes to allow
    creating a nested container. In addition to the usual
    mount points, /dev/.lxc/proc and /dev/.lxc/sys will
    contain procfs and sysfs mount points without the lxcfs
    overlays, which, if generated apparmor profiles are
    being used, will not be read/writable directly.
  lxc.apparmor.raw
    A list of raw apparmor profile lines to append to the
    profile. Only valid when using generated profiles.

The following apparmor profile lines have not been copied
from lxd:

  mount /var/lib/lxd/shmounts/ -> /var/lib/lxd/shmounts/,
  mount none -> /var/lib/lxd/shmounts/,
  mount options=bind /var/lib/lxd/shmounts/** -> /var/lib/lxd/**,

They should be added via lxc.apparmor.raw entries by lxd.

In order for apparmor_parser's cache to be of use, this adds
a --with-apparmor-cache-dir ./configure option.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-07-25 14:37:32 +02:00
Christian Brauner
9a5e7ac4a9
include: add strlcat() implementation
CC: Donghwa Jeong <dh48.jeong@samsung.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-20 13:44:02 +02:00
Christian Brauner
477e62b618
include: add getgrgid_r()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-15 11:39:23 +02:00
Christian Brauner
91c272a571
strlcpy: add strlcpy() implementation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-05-11 13:32:01 +02:00
Fabrice Fontaine
49bc916b1d Fix compilation with static libcap and shared gnutls
Commit c06ed219c4 has broken
compilation with a static libcap and a shared gnutls.
This results in a build failure on init_lxc_static if gnutls is
a shared library as init_lxc_static is built with -all-static option
(see src/lxc/Makefile.am) and AC_CHECK_LIB adds gnutls to LIBS.

This commit fix the issue by removing default behavior of AC_CHECK_LIB
and handling manually GNUTLS_LIBS and HAVE_LIBGNUTLS

Fixes:
 - http://autobuild.buildroot.net/results/b655d6853c25a195df28d91512b3ffb6c654fc90

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-04-07 18:12:12 +02:00
Stéphane Graber
5b66b6ee3e
Release LXC 3.0.0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 21:49:16 -04:00
Stéphane Graber
b195038dfc
configure.ac: Support redhatenterpriseserver
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 15:21:51 -04:00
Stéphane Graber
769cf3c1cc
Release LXC 3.0.0.beta4
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-26 23:38:01 -04:00
Stéphane Graber
b53a26168c
Release LXC 3.0.0.beta3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-23 16:22:00 -04:00
Stéphane Graber
14f16c4171
Release LXC 3.0.0.beta2
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-19 16:05:53 -04:00
Stéphane Graber
282753c6c9
Release LXC 3.0.0.beta1
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-01 13:59:24 -05:00
Christian Brauner
aafb5ea2a8
tree-wide: rm templates in favor of distrobuilder
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:34 +01:00
Christian Brauner
98619a7362
autotools: remove --enable-deprecated
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:34 +01:00
Christian Brauner
e144a06bd7
tree-wide: remove python3 bindings
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:33 +01:00
Christian Brauner
b52a5bef6f
tree-wide: remove lua bindings
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:33 +01:00
Christian Brauner
a9145d622f
tree-wide: cleanup
- remove legacy binaries
- conditionalize creation of docs and tests for the command line tools and the
  shared library helper commands

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:33 +01:00
Christian Brauner
8d0609371e
autotools: add --{enable,disable}-{commands,tools}
This allows users to only compile the shared libray without having to compile
any of the command line tools or command helpers for the shared library.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:30 +01:00
Stéphane Graber
d4feae43a6
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag
configure: add --enable-pam
2018-02-26 12:11:13 -05:00
Christian Brauner
f7a8609fab
configure: add --enable-pam
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:27:46 +01:00
Christian Brauner
35444f3827
templates: add lxc-local template
Closes #2184.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:22:48 +01:00
Christian Brauner
7ac43d3d21
Revert "Revert "pam: create writable cgroups for unpriv users""
This reverts commit 79cf25e826.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:01:18 +01:00