2
0
mirror of git://github.com/lxc/lxc synced 2025-08-29 19:29:48 +00:00

465 Commits

Author SHA1 Message Date
Christian Brauner
52ce85046b
conf: fix thread_local support detection
Our detection for TLS wasn't working. Fix it.

Fixes: https://github.com/lxc/lxd/issues/8327
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-03-29 13:32:00 +02:00
Christian Brauner
7e4ea7bffd
configure: fix strchrnul conditiona compilation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-03-21 16:04:35 +01:00
Christian Brauner
88cf3229fe
string_utils: provide a version of strchrnul() in case it's not available
This should only happen on Android.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-03-20 12:34:36 +01:00
Christian Brauner
b1abf15db2
macro: define __aligned_u64 to handle kernels without such support
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-03-17 19:28:26 +01:00
Christian Brauner
928937b114
cgroups: remove compile-time bpf support detection
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-18 12:42:34 +01:00
Christian Brauner
ac11febd37
mount_utils: add locked flag helpers
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-08 09:53:34 +01:00
Christian Brauner
e8aaef8159
syscalls: add close_range()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-02-03 09:45:30 +01:00
Christian Brauner
6d6bfd4f6c
configure: fix static builds with clang-12 and LTO
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-29 13:04:58 +01:00
Christian Brauner
b59bc011e3
autotools: update build
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-25 17:04:43 +01:00
Christian Brauner
1aaf81c338
configure: add AC_SYS_LARGEFILE checking
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-25 12:51:31 +01:00
Christian Brauner
014a65ef16
configure: support static binaries
Including openssl handling.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-22 19:30:15 +01:00
Eneas U de Queiroz
67cd8bde2d
configure: skip libseccomp tests if it is disabled
Move the block checking for libseccomp api compatibility inside
AM_COND_IF([ENABLE_SECCOMP] ... ).

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-01-16 13:58:22 -03:00
Christian Brauner
2b0c810617
syscalls: add openat2()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-08-09 19:52:30 +02:00
Christian Brauner
7f1d397bbd
syscalls: add fsmount()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-23 10:20:50 +02:00
Christian Brauner
9edfcaa822
syscalls: add fsconfig()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-23 10:20:50 +02:00
Christian Brauner
749bc40479
syscalls: add fspick()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-23 10:20:50 +02:00
Christian Brauner
49b21cd7d9
syscalls: add fsopen()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-23 10:20:48 +02:00
Christian Brauner
35eb5cdcb3
openpty: improve implementation and handling of platforms without it
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-07-06 10:57:47 +02:00
Christian Brauner
2f46fe6e7a
process_utils: make lxc use clone3() whenever possible
No more weird api quirks between architectures and cool new features.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-15 16:08:31 +02:00
Christian Brauner
96086a6b7b
process_utils: add clone3() support
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-15 13:42:56 +02:00
Christian Brauner
f40988c773
process_utils: introduce new process_utils.{c,h}
This will be the central place for all process management helpers. This also
removes raw_syscalls.{c,h}.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-15 12:32:28 +02:00
Christian Brauner
6acf25e36a
gcc: add -Warray-bounds, -Wrestrict, -Wreturn-local-addr, -Wstringop-overflow
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-05 09:21:33 +02:00
Christian Brauner
cf68ffd9e2
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 13:26:43 +02:00
Christian Brauner
538337ee9d
configure: fix coverity builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-04-16 10:03:45 +02:00
Christian Brauner
64a2547c0a
travis: coverity gets confused about the %m printf extension in glibc
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-04-15 21:27:53 +02:00
Wolfgang Bumiller
b62782546c allow running lxc-monitord as a system daemon
lxc-monitord instances are spawned on demand and, if this
happens from a service, the daemon is considered part of
it by systemd, as it is running in the same cgroups. This
can be avoided by leaving it running permanently.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-03-31 15:34:56 +02:00
Stéphane Graber
c40aa8c893
configure.ac: Reset devel flag post-release
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-03-24 16:36:14 -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 3b5a0eebd4d2efdaa03c6fb11950abfcf081fab8 reverted
3aa7271157d3c815a4426c1f8eaea2f3b6dafa6a 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