Commit Graph

11729 Commits

Author SHA1 Message Date
Stéphane Graber
3dee5fb88c
Release LXC 6.0.0
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 23:33:26 -04:00
Serge Hallyn
47ff5c8776
Merge pull request #4424 from stgraber/main
Cleanup MAINTAINERS, COPYING and sort out SPDX headers
2024-04-02 21:47:03 -05:00
Stéphane Graber
17ac6f691f
lxc.spec: Align SPDX license id
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 20:43:37 -04:00
Stéphane Graber
5fe2de84c1
Makefile: Align SPDX license id
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 20:43:30 -04:00
Stéphane Graber
97f93be72e
meson: Align SPDX license id
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 20:42:09 -04:00
Stéphane Graber
d4cd3741d5
COPYING: Clarify licensing of files without SPDX
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 20:29:39 -04:00
Stéphane Graber
8e67eb07c8
doc: Add SPDX headers and remove Author field
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 20:23:13 -04:00
Stéphane Graber
cb94edf538
src/include: Add SPDX headers
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 18:31:26 -04:00
Stéphane Graber
7bc33ef6ee
src/tests: Add SPDX headers
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 18:24:50 -04:00
Stéphane Graber
007642c891
hooks: Add SPDX headers
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:59:17 -04:00
Stéphane Graber
1e9e66be32
lxc.spec: Clear default changelog
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:54:04 -04:00
Stéphane Graber
202d649d1f
lxc.spec: Use SPDX
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:52:37 -04:00
Stéphane Graber
85abd4026f
template: Use SPDX
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:51:55 -04:00
Stéphane Graber
a074b3d27c
config/yum: Use SPDX header
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:50:03 -04:00
Stéphane Graber
7ed43e5e98
COPYING: Remove whitespace
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:49:54 -04:00
Stéphane Graber
5227212166
MAINTAINERS: Remove Dwight from the maintainer list
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 17:45:23 -04:00
Stéphane Graber
96b2bfa788
Merge pull request #4377 from adamcstephens/install-options
build: add more options for customizing install
2024-04-02 13:46:34 -04:00
Serge Hallyn
08d851e15b
Merge pull request #4423 from stgraber/main
lxc-checkconfig improvements
2024-04-02 10:51:03 -05:00
Stéphane Graber
08bf8b9e2f
lxc-checkconfig: Fix shellcheck
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 11:26:48 -04:00
Stéphane Graber
0f18db5432
lxc-checkconfig: Show namespace limits
Closes #4259

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-02 11:25:29 -04:00
Stéphane Graber
5376385828
Merge pull request #4422 from mihalicyn/ct_list_fix
lxc-ls: list names with whitespaces in `--active`.
2024-04-02 10:53:31 -04:00
Edênis Freindorfer Azevedo
f71b8e3f8e
lxc-ls: list names with whitespaces in --active.
Fixes: #3970

Signed-off-by: Edênis Freindorfer Azevedo <edenisfa@gmail.com>
[ small fixes ]
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 16:35:43 +02:00
Stéphane Graber
a85d91b83b
Merge pull request #4421 from mihalicyn/lxc_copy_fixes
lxc/tools: set default log_priority to ERROR
2024-04-02 09:07:45 -04:00
Stéphane Graber
b0fd9a9d2b
Merge pull request #4418 from mihalicyn/cumulative_fixes_2apr2024
confile_utils: fix incorrect multiply_overflow test #2
2024-04-02 09:05:54 -04:00
Christian Brauner
b7707ce398
Merge pull request #4420 from mihalicyn/autostart_fix
tools/lxc_autostart: don't fail when there are no containers
2024-04-02 14:55:51 +02:00
Christian Brauner
17aaada7c7
Merge pull request #4419 from mihalicyn/fixup_mod_rdep
lxc/lxccontainer: specify file mode in open() call inside mod_rdep
2024-04-02 14:55:16 +02:00
Alexander Mikhalitsyn
816b8973d9
lxc/tools: set default log_priority to ERROR
For some reason, we don't have default log_priority
set for many tools which leads to the situation when
tools can fail silently even if error occurs.

Fixes: #4405
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 14:00:36 +02:00
Alexander Mikhalitsyn
989ea3969c
tools/lxc_autostart: don't fail when there are no containers
Fixes: #3847
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 13:43:08 +02:00
Alexander Mikhalitsyn
dc4df23359
lxc/lxccontainer: specify file mode in open() call inside mod_rdep
We must explicitly specify file mode in open(.. O_CREAT ..).

Let's set 0644, while previously it was 0666 [1] which seems too much.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=libio/fileops.c;h=4db4a76f755b1f3b766dc47c669c09242395ec95;hb=HEAD#l216

Fixes: Coverity 1596044
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 12:59:16 +02:00
Alexander Mikhalitsyn
630b46ed28
lxc/confile: do not print excess space before scale suffix for time.offset.boot
Let's make time.offset.boot and time.offset.monotonic getters consistent

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 12:22:16 +02:00
Alexander Mikhalitsyn
796f2ccb74
lxc/confile: do not print newline symbol in getter for lxc.time.offset.*
It's clearly a mistake in the getters implementation.

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 12:22:16 +02:00
Alexander Mikhalitsyn
dcc4fb9294
tests/parse_config_file: fix some typos
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 12:22:16 +02:00
Alexander Mikhalitsyn
6fea674291
tests/parse_config_file: add tests for lxc.time.offset.*
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 12:22:16 +02:00
Arnaud Fontaine
ad8f554458
tree-wide: replace multiply_overflow with check_mul_overflow
Remove redundant multiply_overflow helper and use check_mul_overflow.

This also fixes a bug with incorrect handling for negative offset values.

Link: #4374

Signed-off-by: Arnaud Fontaine <arnaud.fontaine@airbus.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-02 12:22:16 +02:00
Stéphane Graber
80e28c1fe9
Merge pull request #4417 from mihalicyn/revert-3951-2021-08-25.fixes
Rework "lxccontainer: fixes" PR
2024-04-01 17:16:55 -04:00
Christian Brauner
4464cee193
lxccontainer: rework copy_file()
Signed-off-by: Christian Brauner <christian@brauner.io>
resurrect file_exists(new) check
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-01 20:39:16 +02:00
Christian Brauner
9d1aa932df
lxccontainer: improve mod_rdep()
Signed-off-by: Christian Brauner <christian@brauner.io>
O_RDWR -> O_WRONLY | O_CREAT
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-01 20:39:02 +02:00
Alexander Mikhalitsyn
81c1bbf455
Revert "lxccontainer: fixes"
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2024-04-01 20:09:26 +02:00
Stéphane Graber
bb2f37b87e
Merge pull request #3951 from brauner/2021-08-25.fixes
lxccontainer: fixes
2024-04-01 09:21:05 -04:00
Stéphane Graber
5d03e0c13e
Merge pull request #4416 from ffontaine/main
src/lxc/syscall_numbers.h: drop define -1
2024-03-30 21:13:21 -04:00
Fabrice Fontaine
82fe01821c src/lxc/syscall_numbers.h: drop define -1
Drop "#define -1" to avoid the following m68k build failure with gcc 12:

In file included from ../src/lxc/syscall_wrappers.h:19,
                 from ../src/lxc/mount_utils.h:15,
                 from ../src/lxc/conf.h:24,
                 from ../src/lxc/log.h:19,
                 from ../src/lxc/storage/btrfs.c:20:
../src/lxc/syscall_numbers.h:423:25: error: macro names must be identifiers
  423 |                 #define -1
      |                         ^

Fixes:
 - http://autobuild.buildroot.org/results/f40a517eba86838b11b4b1d6a8a05b8233a3394d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2024-03-30 17:01:57 +01:00
Stéphane Graber
d887f5ef2b
Merge pull request #4346 from zhongTao99/fix
containers in the FREEZING state also need to be unfreeze
2024-03-26 10:37:20 -04:00
Serge Hallyn
632b27b994
Merge pull request #4412 from petris/fix_rexec_free
rexec: Avoid invalid free in rexec failure path
2024-03-22 20:34:50 -05:00
Petr Malat
590a95d836 rexec: Avoid invalid free in rexec failure path
Commit "rexec: free argv array on failure" used __do_free_string_list
as a destructor for argv, which is an array of pointers to a single
buffer and not an array of pointers to independent buffers, which leads
to an attempt to free invalid pointer whenever argv has more than one
element.

Structure argv as one memory block and use __do_free as the destructor.

Signed-off-by: Petr Malat <oss@malat.biz>
2024-03-19 09:34:35 +01:00
Stéphane Graber
4b8d64efcd
Merge pull request #4414 from cjavad/main
README: Correct 'armvl7' to 'armv7l'
2024-03-18 03:28:38 -04:00
Javad Shafique
f9978b1790
README: Correct 'armvl7' to 'armv7l'
Use the correct designation for the armv7l arch, as also reflected in src/lxc/confile.c.

Signed-off-by: Javad Shafique <javadshafique@hotmail.com>
2024-03-17 22:18:35 +01:00
Stéphane Graber
f1a102400a
Merge pull request #4411 from hallyn/2024-03-11/simplify-lookup_name
unshare: simplify lookup_name
2024-03-11 19:37:09 -04:00
Serge Hallyn
046b63cd20 unshare: simplify lookup_name
pass the optarg straight to getpwnam_r, instead of first
scanning the name out of it.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2024-03-11 15:55:46 -05:00
Stéphane Graber
52cd79b7b8
Merge pull request #4410 from HappyDrink-okk/main
lxc-unshare: fix an buffer overflow issue in lxc_unshare
2024-03-11 15:42:22 -04:00
HappyDrink-okk
7452ee8aba lxc-unshare: fix an buffer overflow issue in lxc_unshare
If the input parameter length is greater than PATH_MAX, a buffer overflow will occur.

Signed-off-by: HappyDrink-okk <liu7529@yeah.net>
2024-03-11 22:27:56 +08:00