1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00
Commit Graph

68836 Commits

Author SHA1 Message Date
Yu Watanabe
4d8b8f79d0
Merge pull request #30044 from poettering/dissect-tool-tweaklets
systemd-dissect --discover tweaklets
2023-11-16 11:27:47 +09:00
Luca Boccassi
461ef3981f sd-dhcp: use CMSG_FIND_AND_COPY_DATA to avoid build failures on x32 architectures
On architectures where timeval is 64bit but size_t is 32bit
we have to use CMSG_FIND_AND_COPY_DATA. This affects x32 and riscv32.

Follow-up for 905d0ea7b0
2023-11-16 11:26:57 +09:00
Lennart Poettering
ba113008de dissect: set dash as ersatz string 2023-11-15 22:51:37 +01:00
Lennart Poettering
8f488d4634 dissect: right-align size column in --discover table 2023-11-15 22:51:37 +01:00
Frantisek Sumsal
1fa20dde9f
Merge pull request #30040 from yuwata/assert-return-fixes
several assert_return() fixes
2023-11-15 21:05:06 +00:00
Krzesimir Nowak
59c8afbc89 repart: Fix compilation warning when tpm2 is disabled
The warning is about unused variable "flags":

```
../src/partition/repart.c: In function ‘partition_encrypt’:
../src/partition/repart.c:3690:19: warning: unused variable ‘flags’ [-Wunused-variable]
 3690 |         TPM2Flags flags = 0;
      |                   ^~~~~
```

Move the flags variable into the scope where it is actually used, which happens
to be inside the HAVE_TPM2 block.
2023-11-15 19:55:50 +00:00
Yu Watanabe
aecedc48a6 sd-device: do not trigger assertion by a bad udev rules
The assertion can be triggered by bad `$attr{[<subsys>/<sysname>]<attribute>}`
formatting. That's not a programmer's error, but a runtime error.

Prompted by #30029.
2023-11-16 02:32:12 +09:00
Yu Watanabe
c0b927eb3a dhcp: do not trigger assertion by malformed messages
This also changes error code from -ENODATA -> -EBADMSG,
as we received bad message in that case.

Prompted by #30029.
2023-11-16 02:32:12 +09:00
Yu Watanabe
4f6ae86629 network: do not try to create netdev from tests
Prompted by #30029.
2023-11-16 02:32:12 +09:00
Luca Boccassi
298b218fc8 NEWS: finalize for v255-rc2 2023-11-15 16:31:53 +00:00
Luca Boccassi
83aa04b998
Merge pull request #30033 from mrc0mmand/assert_return-tweaks
Dial back a couple of `assert_return()` uses
2023-11-15 16:24:48 +00:00
Luca Boccassi
5b2e6c7c67
Merge pull request #30035 from keszybz/buid-sys-cleanups
Build system cleanups
2023-11-15 16:05:29 +00:00
Mike Yuan
dfb210c8fb
man/systemd-creds: fix a typo 2023-11-15 22:28:52 +08:00
Zbigniew Jędrzejewski-Szmek
a05bf18ed9 hwdb/acpi-update.py: streamline python code
Use f-strings and simplify the code a bit.

When I call 'acpi-update.py' after those changes, the resulting .hwdb files are
the same except for two additions that appeared in the meantime. I don't think
it makes sense to update them again, because the ma-*.txt files changed and we
don't want to store big blobs unnecessarilly.
2023-11-15 15:25:26 +01:00
Zbigniew Jędrzejewski-Szmek
94113d5f19 hwdb: rename .html=>.csv
The old suffix is now confusing.
2023-11-15 15:21:26 +01:00
Frantisek Sumsal
59461f086f test: update Ubuntu CI instructions 2023-11-15 14:58:20 +01:00
Luca Boccassi
03745d68f3
Merge pull request #30030 from poettering/gpt-growfs-root-fix
make gpt flag 59 (growfs) actually work on the root fs
2023-11-15 13:57:28 +00:00
Zbigniew Jędrzejewski-Szmek
3e0cf73243 meson: use ternary op for brevity 2023-11-15 14:53:11 +01:00
Zbigniew Jędrzejewski-Szmek
7eff3e2cdb NEWS: adjust indentation
A non-breaking space is used between "PCR" and the number. I did
search&replace on the whole file, so that when people select&paste
later, they are more likely to use the same format.
2023-11-15 14:53:11 +01:00
Frantisek Sumsal
6565b9d0b1 sd-bus: don't treat invalid user/machine as a programming error
$ SYSTEMD_LOG_LEVEL=debug machinectl status --machine=@
Assertion 'r > 0' failed at src/libsystemd/sd-bus/sd-bus.c:1694, function sd_bus_open_system_machine(). Ignoring.
2023-11-15 13:56:50 +01:00
Frantisek Sumsal
6e07f600ba mount: don't call sd_device_get_property_value() with a NULL pointer
Otherwise bad thing would've happened is this was a hard assert:

+ systemd-mount --umount /dev/loop0
Assertion 'device' failed at src/libsystemd/sd-device/sd-device.c:2202, function sd_device_get_property_value(). Ignoring.
2023-11-15 13:46:09 +01:00
Frantisek Sumsal
17122c3de1 sd-journal: don't treat invalid match as a programming error
Don't use assert_runtime() when we get an invalid match string, since
that's a runtime error:

$ SYSTEMD_LOG_LEVEL=debug coredumpctl info =
...
Adding match: =
Assertion 'match_is_valid(data, size)' failed at src/libsystemd/sd-journal/sd-journal.c:240, function sd_journal_add_match(). Ignoring.
Failed to add match "=": Invalid argument
2023-11-15 13:38:02 +01:00
Lennart Poettering
4bec240751 boot: measure config first, only then parse
Fixes: #30026
2023-11-15 13:36:46 +01:00
Lennart Poettering
6b5fe5d75e gpt-auto-generator: hook in "growfs" for the root fs if the GPT flag 59 says so
Fixes: #29791
2023-11-15 13:21:15 +01:00
Lennart Poettering
40b1224ea7 gpt-auto-generator: don't eat up errors of generator_enable_remount_fs_service()
I cannot see a reason why we should ignore this error, so let's not. We
use RET_GATHER() on the returns anyway, i.e. collect errors but
continue, so it makes sense to collect this one too.
2023-11-15 13:21:10 +01:00
Lennart Poettering
ca8ac0f9b5 gpt-auto-generator: add comment + assert() explaining mode of invocation
We are not invoked in the initrd, and that deserves a comment.
2023-11-15 13:21:06 +01:00
Lennart Poettering
5253b4a99f gpt-auto-generator: drop in_initrd() check in add_partition_root_rw()
This call is never called in the initrd, hence we can drop the extra
check, as it is redundant. Let's keep it as an assert() though, as a
form of code-enforced documentation.
2023-11-15 13:20:53 +01:00
Frantisek Sumsal
a3d3bf559c fuzz: don't panic without a C++ compiler
meson's `cpp_args` option is defined only if it detects a C++ compiler,
otherwise we get an error:

../test/fuzz/meson.build:56:28: ERROR: Tried to access unknown option 'cpp_args'.
2023-11-15 12:07:42 +00:00
Lennart Poettering
b0f965966b NEWS fixes 2023-11-15 11:52:27 +01:00
Luca Boccassi
0dcd7b357a
Merge pull request #30028 from yuwata/duid-fix-size
dhcp: fix DUID size
2023-11-15 09:49:46 +00:00
Yu Watanabe
fdf759e3ae sd-dhcp6-client: fix DUID data length passed to hexmem()
Fixes a bug introduced by 6b7d5b6eaf.
2023-11-15 14:41:02 +09:00
Yu Watanabe
1ae9a98292 dhcp: fix maximum DUID size
This effectively reverts 9291496011.

This fixes the maximum length of DUID.
See RFC 8415 section 11.1.
2023-11-15 14:38:55 +09:00
Yu Watanabe
b3884498a9 dhcp: drop unused prototype
Follow-up for 53488ea352.
2023-11-15 10:17:34 +09:00
Yu Watanabe
516cca5a51
Merge pull request #30027 from bluca/news
Update syscalls/hwdb/po
2023-11-15 10:17:19 +09:00
Luca Boccassi
077a10c062 Update po files
These are all newline breaks, but some meson tool changed at some
point that causes all of these changes to happen, and they have
started to appear when Weblate sends translations update, making
them very hard to review as they are mostly adding these breaks.
Update all files once and for all so that new translations PRs are
easier to review.
2023-11-14 21:26:27 +00:00
Luca Boccassi
4ab8f52ac6 Update hwdb 2023-11-14 21:20:45 +00:00
Luca Boccassi
9a86f08412 hwdb: PNP/ACPI lists on uefi.org are now in CSV format
Adjust the parsing as it's no longer HTML files. Some IDs end with
whitespace, without being quoted, which seems like a mistake as they
weren't before, so strip the ID columns before applying them.
2023-11-14 21:07:08 +00:00
Luca Boccassi
094d85a6bb docs/RELEASE.md: retain systemd.io in IRC topic update 2023-11-14 20:18:50 +00:00
Luca Boccassi
b1ef479d5a Update syscalls list 2023-11-14 20:17:48 +00:00
Luca Boccassi
6060271263 NEWS: update contributors list 2023-11-14 20:11:56 +00:00
Luca Boccassi
feed291094 NEWS: update for latest features 2023-11-14 20:11:01 +00:00
Luca Boccassi
e437b28054
Merge pull request #30023 from mrc0mmand/selinux
test: make TEST-06-SELINUX work with the refpolicy and beef it up a bit
2023-11-14 19:04:35 +00:00
Frantisek Sumsal
5ef964f88c test: make TEST-06-SELINUX work with the refpolicy and beef it up a bit
Currently the test works only with policy shipped by Fedora, which makes
it pretty much useless in most of our CIs. Let's drop the custom module
and make the test more generic, so it works with the refpolicy as well,
which should allow us to run it on Arch and probably even in Ubuntu CI.
2023-11-14 18:54:16 +01:00
Zbigniew Jędrzejewski-Szmek
b484c250cc
Merge pull request #29930 from yuwata/meson-default-network-fix-install-path
meson: fix install path of example .network files
2023-11-14 17:33:42 +01:00
Zbigniew Jędrzejewski-Szmek
6f4e496685
Merge pull request #29928 from yuwata/meson-default-network
meson: follow-ups for -Ddefault-network=
2023-11-14 17:33:03 +01:00
Frantisek Sumsal
bbe865b2fe test: switch SELinux to permissive in the config file
The config file has (unfortunately) precedence over the kernel command
line, so let's tweak the config file if necessary.
2023-11-14 12:54:50 +01:00
Vito Caputo
8c5f6494bc doc: some trivial cleanups to MEMORY_PRESSURE.md 2023-11-14 09:46:57 +00:00
Yu Watanabe
921961c3a3 storagetm: use path to device node instead of devpath
To make the generated IDs equivalent when
- sd_device object is not provided,
- sd_device object is provided, but it does not have ID_SERIAL.

Follow-up for abc19a6ffa.

This also fixes missing voidification.

Fixes CID#1524253.
2023-11-14 08:52:40 +01:00
Luca Boccassi
4ce6e7d158 selinux: fix loading policy at early boot
First, check for the cached enabled/disabled, as that's what all the
label functions used to do. Then, if initialization is not done yet,
do not cause the label functions to bail out, as it's expected to
happen at early boot.

Among other things, fixes:

systemd[1]: Failed to compute init label, ignoring.

Follow-up for: 0617da2edb
2023-11-13 21:32:46 +00:00
Luca Boccassi
888dccfde0
Merge pull request #30007 from YHNdnzj/memory-attr-followup
core: generalize memory accounting attribute handling
2023-11-13 21:12:06 +00:00