1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-28 11:21:59 +03:00
Commit Graph

67523 Commits

Author SHA1 Message Date
Lennart Poettering
d30eb0b5d9 mount: also rework log message generation 2023-09-27 17:30:20 +02:00
Lennart Poettering
a237a93e6c socket: clean up error message generation/fail paths also for the socket state engine 2023-09-27 17:29:14 +02:00
Lennart Poettering
a951c1aea0 socket: modernize socket_acquire_peer() a bit 2023-09-27 17:28:19 +02:00
Lennart Poettering
529f768ab8 socket: drop redundant TAKE_FD(cfd) line
In the only two codepaths we reach this place we know that cfd is
already invalidated. In the Accept=yes case there's already a
TAKE_FD() a few lines further up, and in the Accept=no case there is no
connection fd anyway.
2023-09-27 17:27:23 +02:00
Lennart Poettering
3dde96d854 service: add error handling for all service_arm_timer() invocations
Let's clean this up a bit, and catch all errors and do something
reasonable in case this happens.
2023-09-27 17:26:18 +02:00
Lennart Poettering
10691b9e50 service: clean up logging a bit
This rearranges various cases of "goto fail" in service.c: sometimes the
whole "goto fail" logic was redundant, since only jumped to form a
single place. Sometimes the log message was generated in the fail
section, instead of the place jumped to from, which resulted in
duplicate or misleading error messages.

No real codeflow changes, just refactoring primarily around log
messages.
2023-09-27 17:24:33 +02:00
Lennart Poettering
174e8e9897
Merge pull request #29345 from poettering/measured-uki-condition
pid1: introduce ConditionSecurity=measured-uki
2023-09-27 16:39:46 +02:00
Mike Yuan
563ef8f950
sleep-config: add explanatory comment on "modes" 2023-09-27 21:48:40 +08:00
Mike Yuan
087a25d2ca
sleep-config: several cleanups
* Rename free_sleep_config to sleep_config_free
* Rearrange functions
* Make SleepConfig.modes and .states only contain
  operations that needs configuration
* Add missing assert
2023-09-27 21:48:39 +08:00
Mike Yuan
f3afe9dc20
sleep/battery-capacity: rearrange functions 2023-09-27 21:48:39 +08:00
Mike Yuan
7f88eee935
sleep/battery-capacity: drop unused error-handling 2023-09-27 21:48:39 +08:00
Mike Yuan
fbc1dbf296
sleep/battery-capacity: don't report we have trip alarm if no battery is found 2023-09-27 21:48:39 +08:00
Mike Yuan
54d7fcc6a3
sleep-util: split into sleep-config and hibernate-util 2023-09-27 21:48:39 +08:00
Mike Yuan
7d769198e0
sleep-util: split battery-capacity into sleep/
This is only used by sleep.c. Let's start shrinking down
the "mixed" sleep-util.
2023-09-27 21:48:39 +08:00
Mike Yuan
43309f14d9
sleep: rebreak lines in check_wakeup_type 2023-09-27 21:48:39 +08:00
Mike Yuan
1482feda01
sleep-util: move check_wakeup_type to sleep/sleep 2023-09-27 21:48:39 +08:00
Luca Boccassi
93bd6e3714
Merge pull request #29134 from nabijaczleweli/short-iso-timestamp
journalctl -o short-iso[-precise]: timezone as +02:00 instead of +0200
2023-09-27 14:42:27 +01:00
Zbigniew Jędrzejewski-Szmek
e071384dc5 Merge pull request #29296 from yuwata/sd-journal-several-cleanups-for-boot-id 2023-09-27 14:56:48 +02:00
Frantisek Sumsal
c1b129f4ad test: introduce TEST-09-REBOOT
To test stuff involving state preserved across (multiple) reboots, like
journal boot IDs.
2023-09-27 14:50:19 +02:00
Luca Boccassi
578840bdf9
Merge pull request #29296 from keszybz/make-cryptsetup-offical-and-add-docs
Make cryptsetup offical and add docs
2023-09-27 13:31:11 +01:00
Mike Yuan
99f360a46b units/blockdev@.target: conflict with umount.target
Follow-up for d120ce478d

blockdev@.target is used as a synchronization point between
the mount unit and corresponding systemd-cryptsetup@.service.
After the mentioned commit, it doesn't get a stop job enqueued
during shutdown, and thus the stop job for systemd-cryptsetup@.service
could be run before the mount unit is stopped.

Therefore, let's make blockdev@.target conflict with umount.target,
which is also what systemd-cryptsetup@.service does.

Fixes #29336
2023-09-27 12:33:40 +02:00
Lennart Poettering
d81bd3a22a update TODO 2023-09-27 12:17:18 +02:00
Lennart Poettering
c24f9f5371 efi-loader: add caching to efi_measured_uki()
EFI variable access is slow, hence let's avoid it if there's no need.
Let's cache the result of efi_measured_uki() so that we don't have to go
to the EFI variables each time.

This only caches in the yes/no case. If we encounter an error we don't
cache, so that we go to disk again.

This should optimize things a bit given we now have a bunch of services
which are conditioned with this at boot.
2023-09-27 12:14:56 +02:00
Lennart Poettering
8506bf494d units: move units over to ConditionSecurity=measured-uki 2023-09-27 12:13:26 +02:00
Lennart Poettering
340d979af3 condition: add ConditionSecurity=measured-uki
We have various services that should only run in a measured UKI
environment. Let's add an explicit high-level check for that.
2023-09-27 12:10:46 +02:00
Lennart Poettering
be8f478c0f efi-loader: rename efi_stub_measured() → efi_measured_uki()
Let's say "uki" rather than "stub", since that is just too generic, and
we shouldn't limit us to our own stub anyway, but generally define a
concept of a "measured UKI", which is a UKI that measures its part to
PCR 11.

This is mostly preparation for exposing this check to the user via
ConditionSecurity=.
2023-09-27 11:51:13 +02:00
Susant Sahani
0ba8374bb8 ndisc: Also set link hoplimit
The per route hop limit does not place the hop limit in the IPv6 header.
https://github.com/systemd/systemd/issues/28437#issuecomment-1711055181
2023-09-27 11:05:15 +02:00
Lennart Poettering
c8cb548f0b Revert "userdbd: Order systemd-userdbd.service after systemd-remount-fs.service"
This reverts commit 9dd8858281.
2023-09-27 11:02:06 +02:00
Christian Hesse
75271582be fix typo in NEWS
Looks like `-a change` is a typo and should have been `-c change` to
match on the action.
2023-09-27 17:24:39 +09:00
Balázs Úr
3d6df0c4e2 po: Translated using Weblate (Hungarian)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Balázs Úr <balazs@urbalazs.hu>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/hu/
Translation: systemd/main
2023-09-27 07:56:54 +00:00
Abderrahim Kitouni
ad4934904a update-dbus-docs: Test that items are documented in the History section
This also adds an ignore list, which currently contains the whole API as of
version 250, since that's the base we used for dbus interfaces.

See d9d2d16aea
2023-09-26 19:11:53 +01:00
Daan De Meyer
3bd337a084 network: Rename json_append_one() and move to json.h 2023-09-26 19:01:34 +01:00
Daan De Meyer
418a498777 journal: Stop trying to open runtime journal once flushed
Once we've flushed the runtime journal to /var, stop trying to open
it since that will just fail with ENOENT all the time.
2023-09-26 19:01:07 +01:00
Jan Janssen
90461ef56f meson: Fix version script handling
Build targets should have a link dependency on the version scripts they
use. This also uses absolute paths in anticipation for meson 1.3
needlessly deprecating file to string conversions.
2023-09-26 19:41:53 +02:00
huyubiao
b53a80966e systemd-hwdb: fix unsigned and signed comparison problem
...
uint8_t c;
struct trie_node *child;

for (p = 0; (c = trie->strings->buf[node->prefix_off + p]); p++) {
        _cleanup_free_ struct trie_node *new_child = NULL;
        _cleanup_free_ char *s = NULL;
        ssize_t off;
if (c == search[i + p])
        continue;
...
When '®' is present in search, c is 194, search[i + p] is -62, c is not equal to search[i + p], but c should be equal to search[i + p].
2023-09-26 17:38:16 +01:00
Zbigniew Jędrzejewski-Szmek
10aeee95d0 man: rename systemd-cryptsetup@.service → systemd-cryptsetup
We already had the other name as alias, so this just changes what is the "main"
name. The text is adjusted to describe the command briefly.
2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
ab68c6fb08 TEST-70: use new cryptsetup path 2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
a1ca52c2da meson: add comments to compat symlinks 2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
fb8d67cd34 meson: move systemd-cryptsetup to /usr/bin
This was requested, though I think an issue was never filed. If people are
supposed to invoke it, even for testing, then it's reasonable to make it
"public".
2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
5bae80bd44 cryptsetup: fail with error if extraneous arguments are specified
So far the program would silently ignore those… I think it's better to fail.
2023-09-26 16:21:31 +02:00
Zbigniew Jędrzejewski-Szmek
166015faf5 cryptsetup: add parse_argv() and implement --version
All public programs are expected to have that. The --help output is adjusted to
follow the usual style (highlighting, listing of options). The OPTIONS
positional argument is renamed to "CONFIG", because we now also have "OPTIONS…"
to describe the non-positional options.
2023-09-26 16:20:29 +02:00
Zbigniew Jędrzejewski-Szmek
4cc8e81db5 cryptenroll: align tables 2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
5f5f1ba169 man/crypttab: fix indentation 2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
4381474f7f man/crypttab: add a more comprehensive example of encrypted device setup 2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
12c346d8e8 man/crypttab: do not recommend using /dev/sdX symlinks in /etc/crypttab
This is just wrong. Quering the symlink names with udevadm is not the
easiest, but I think that's the safest way for a documented example.
2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
38e3c61dbb man/cryptenroll: link to crypttab(5) for examples
I was missing an example of how to use cryptenroll. We have that, but in
another page. Instead of repeating, let's just direct the user to the right
place.

Also, reformat synopsis to the "official" non-nested syntax.
2023-09-26 15:35:06 +02:00
наб
0693e6b246
journalctl -o short-iso[-precise]: timezone as +02:00 instead of +0200 2023-09-26 15:24:13 +02:00
наб
bf83c6707e
journalctl.1: move --truncate-newline to the options instead of the -o values list 2023-09-26 14:45:08 +02:00
beh_10257
5808300c44
add support for hp pavilion gaming 15 lid switch (#29304)
Tested together with kernel patch: https://lore.kernel.org/linux-acpi/20230920130506.8595-1-hdegoede@redhat.com/
but the d7 key is still interpreted as a wlan key switch, so an hwdb update is needed.

Raw dmi:

dmi:bvnInsyde:bvrF.45:bd07/07/2023:br15.45:efr2.51:svnHP:pnHPPavilionGamingLaptop15-dk1xxx:pvrType1ProductConfigId:rvnHP:rn8742:rvr02.51:cvnHP:ct10:cvrChassisVersion:sku20T68EA#BH4::

Related to: https://github.com/systemd/systemd/issues/28942
2023-09-26 13:32:03 +01:00
Lennart Poettering
d4899d49e6 Revert "man: Add /usr/local/lib path to Synopsis section for modules-load"
This reverts commit 1781176768.
2023-09-26 13:15:12 +01:00