Commit Graph

68960 Commits

Author SHA1 Message Date
Mike Yuan
9136de6934
analyze: use FOREACH_ARRAY more 2023-11-23 20:53:46 +08:00
Mike Yuan
57d3a6aaf8
core/manager: open our parent dir with O_PATH 2023-11-23 20:44:32 +08:00
Mike Yuan
9e743e7ea9
core/manager: correct and simplify errno handling
open_parent() is our own function that returns negative errno.
2023-11-23 20:42:44 +08:00
Mike Yuan
5cacac04fa
core/manager: rename result parameter to ret 2023-11-23 20:42:43 +08:00
Mike Yuan
0f9267501b exec-util: don't say sd-executor to avoid ambiguity
We have a systemd-executor binary now.
2023-11-23 11:39:07 +00:00
Zbigniew Jędrzejewski-Szmek
205a30fa13 meson: always install network example files
I started working on integrating this in the Fedora package and realized that
the example files should be installed regardless of the renamed files when
default-network=true is used. This is because the renamed files become part of
a different package, and we want to have the other files which are used as
documentation in the main package anyway.
2023-11-23 10:02:36 +00:00
Luca Boccassi
a935f3dd7e Finalize NEWS for v255-rc3 2023-11-22 20:41:04 +00:00
Yu Watanabe
19f0a71ba0 io-util: actually retry on failure
Follow-up for e22c60a9d5.

Fixes #30152.
2023-11-22 20:38:38 +00:00
Luca Boccassi
fc88adc704
Merge pull request #30153 from bluca/news
Update NEWS and hwdb
2023-11-22 20:24:22 +00:00
Luca Boccassi
054042f8e1 NEWS: note about reexec on update, for sd-executor 2023-11-22 18:04:21 +00:00
Luca Boccassi
60142662a4 NEWS: update contributors list 2023-11-22 18:04:21 +00:00
Luca Boccassi
bf4b97abdb hwdb: update 2023-11-22 18:04:21 +00:00
Christian Hesse
0f1dcf9d79 systemctl: distinguish reload and reexec
This used to log about reload, for reload and reexecution. Let's
distinguish the two cases.
2023-11-22 17:45:04 +00:00
Mike Yuan
0ca66adfcc conf-parser: only read the first found main config file
Follow-up for 93f1da4556
and 8ea288db01

Before the offending commits, we only read the first found
main config file. If the main config file is symlinked to/as
a drop-in, we should break instead of continuing, for it to
be read later.
2023-11-22 17:44:54 +00:00
Lennart Poettering
40e1100283 recurse-dir: correct comment
The RECURSE_DIR_ENSURE_TYPE flag is actually interpreted by
readdir_all() already, hence rearrange comments to say so.
2023-11-22 17:44:29 +00:00
Luca Boccassi
61c232dc8b
Merge pull request #30145 from poettering/reset-terminal-line-editing
make terminal line editing work with systemd-firstboot
2023-11-22 17:43:51 +00:00
Luca Boccassi
7d4b61d287
Merge pull request #30149 from yuwata/setlocale
locale-util: do not call setlocale() when multi-threaded
2023-11-22 17:43:39 +00:00
Luca Boccassi
c1fd45d067
Merge pull request #30143 from poettering/machine-credential-fixes
machine credential fixes
2023-11-22 17:43:14 +00:00
Luca Boccassi
31897753fb
Merge pull request #30024 from keszybz/one-doc-thingy
Serialize units ratelimits and document StartLimitIntervalSec=infinity
2023-11-22 17:42:51 +00:00
Lennart Poettering
9b85e90780 fs-util: add comment explaining what xopenat() is for 2023-11-23 02:29:37 +09:00
Yu Watanabe
d54a45ad5f locale-util: drop unused init_gettext()
The function has not been used since 96d9117ad2.
2023-11-23 00:50:46 +09:00
Yu Watanabe
ca13432d60 locale-util: do not call setlocale() when multi-threaded
Fixes #30141.
2023-11-23 00:50:42 +09:00
Lennart Poettering
2105f79ed3 machine-credential: tweak --load-credential= use a bit
Let's try to recognize paths (i.e. those with a "/") as source for
credentials to load, and then read them from the file system. Also, only read
credentials from an inbound credentials directory if the source
qualifies as valid credential name.

Otherwise print a nice error.
2023-11-22 15:17:18 +01:00
Lennart Poettering
1311946233 machine-credential: simplify code a bit 2023-11-22 15:17:18 +01:00
Lennart Poettering
437f3e156d machine-credential: use word 'Credential' rather than 'MachineCredential'
Probably some search/replace mistake.
2023-11-22 15:17:18 +01:00
Lennart Poettering
d66c4d101e machine-credential: fix GREEDY_REALLOC error handling
We must check the return value of GREEDY_REALLOC for OOM, and the
pointer are updated already on success, hence it's a bad idea to make a
copy of the pointer beforehand.
2023-11-22 15:17:18 +01:00
Lennart Poettering
6045958bab machine-credential: fix error logging
Remove duplicate logging: let exclusively
machine_credential_load()/machine_credential_set() log, and not the
caller again.
2023-11-22 15:16:32 +01:00
Yu Watanabe
3197d778e0 journal: sync immediately on shutting down journald
Otherwise, sd_event_add_time_relative() or sd_event_source_set_time_relative()
below will trigger assert_return().

Prompted by #30029.
2023-11-22 14:07:19 +00:00
Zbigniew Jędrzejewski-Szmek
51ad723d20 core: serialize and deserialize trigger ratelimits for socket and path 2023-11-22 12:32:31 +00:00
Zbigniew Jędrzejewski-Szmek
fed25720ef core: use uniform style for RateLimit initialization
RateLimit is designed so that we can always initialize only the first two
fields explicitly. All other call sites use a single line for this.
2023-11-22 12:32:31 +00:00
Lennart Poettering
5fee4ac0f4 firstboot: reset terminal settings right before asking a question
We are about to do interactivity on the terminal, hence let's ensure we
are in the TTY mode we expect to be in.
2023-11-22 13:27:53 +01:00
Lennart Poettering
d5b6c6e378 terminal-util: drop ECHOPRT flag from TTY settings when resetting
Let's disable ECHOPRT for terminals we reset.

The feature only really makes sense for hardcopy terminals and we sure
as shit don't talk to one of those. It has the effect that when line
editing is on and you hit backspace it outputs "\" followed by the
removed character. This never makes sense on a TTY that can just erase
the character.

Hence turn of this flag.

We have carried this flag along for about forever, but it doesn't really
make sense. I guess we mostly tested the terminal reset stuff for output
only, not for input.

This change is in particular useful for tools such as
"systemd-firstboot" which interactively ask questions on the console,
and where line editing should really work.
2023-11-22 13:27:53 +01:00
Lennart Poettering
68e4c637f8 terminal-util: trivial modernizations for reset_terminal_fd() 2023-11-22 13:27:53 +01:00
Zbigniew Jędrzejewski-Szmek
b2bd488e76 core: serialize and deserialize auto start/stop ratelimit
The limit is not configurable, so the logic in the helper will always update
the counters. The helper is a bit overkill, but it doesn't really matter.
2023-11-22 12:12:35 +00:00
Zbigniew Jędrzejewski-Szmek
6ef512c0bb core: serialize and deserialize unit start ratelimits
The logic is taken from dump ratelimit: if the config changes, we discard the
counters. This allows the user apply new limits and "start from scratch" in
that case.

This actually makes StartLimitIntervalSec=infinity (or with a large interval)
work as expected, because the counter is maintained even if daemon-reload
operations are interleaved.
2023-11-22 12:12:35 +00:00
Lennart Poettering
097445d0e4 update TODO 2023-11-22 11:00:30 +01:00
Yaron Shahrabani
97f9a25cfd po: Translated using Weblate (Hebrew)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/he/
Translation: systemd/main
2023-11-22 11:12:49 +09:00
Yu Watanabe
a461f81aac
Merge pull request #30133 from yuwata/fix-draw-cylon
pid1: fix draw_cylon()
2023-11-22 10:48:49 +09:00
Yu Watanabe
2b43729bf9 sd-journal: warn about seals may not be continuous only when the file is sealed
Follow-up for e375bc5fcc.

Fixes #30118.
2023-11-22 10:48:21 +09:00
Yu Watanabe
fa3ab903f3 test: add test for draw_cylon() 2023-11-22 08:59:29 +09:00
Yu Watanabe
d61a4dbba9 pid1: move draw_cylong() to pretty-print.[ch] 2023-11-22 08:59:23 +09:00
Yu Watanabe
0fe9604359 pid1: terminate cylon string
Fixes #30121.
2023-11-22 08:49:25 +09:00
Lennart Poettering
5e5d4d36b4 test: make sure pcrlock tests run headless
We want the tests to fail rather than hang if unlock via tpm doesn't
work.
2023-11-21 23:43:23 +00:00
Luca Boccassi
8bff168cb4
Merge pull request #30128 from yuwata/network-rapid-commit-follow-ups
network/dhcp: several follow-ups for RapidCommit=
2023-11-21 23:43:00 +00:00
linuxlion
9023630cb7
Update 60-autosuspend.hwdb (#30131)
* Update 60-autosuspend.hwdb

Framework provides expansion cards. For the HDMI and DisplayPort, these benefit power management via enabling auto suspend.
2023-11-21 23:38:54 +00:00
Yu Watanabe
ca49e745c0 pid1: drop unnecessary space 2023-11-22 08:26:34 +09:00
Yu Watanabe
b65c539088 test-network: add tests for [DHCPv4] AllowList= and DenyList=
We have not tested if the settings actually filter DHCP servers.
Let's add a test case for the settings.

Note, the .network file used here has been unused since
0730e3767d. So, we can freely reuse it
without changing other test cases.

Closes #30107.
2023-11-22 05:37:04 +09:00
Yu Watanabe
cf289b1415 network/dhcp: disable RapidCommit= by default when AllowList=/DenyList= is specified
AllowList= and DenyList= filter only DHCPOFFER messages. So, if
RapidCommit= is enabled, then networkd unconditionally accepts a rapid
ACK message even if its sender is filtered out by the lists.

As AllowList=/DenyList= implemented earlier than RapidCommit=, so
enabling RapidCommit= unconditionally by default may break existing
setups that use AllowList=/DenyList=.

Let's disable RapidCommit= by default when AllowList=/DenyList= is
enabled. Still the setting can be enabled by setting explicitly even
AllowList=/DenyList= is also specified.
2023-11-22 05:24:18 +09:00
Yu Watanabe
24bb67ed12 man: [DHCPv4] RapidCommit= is disabled when Anonymize=yes 2023-11-22 04:57:05 +09:00
Yu Watanabe
b6d669d5af systemctl: fix typo
Follow-up for f380473edf.
2023-11-22 04:44:52 +09:00