Commit Graph

81632 Commits

Author SHA1 Message Date
Lennart Poettering
232f4e12fe logind: fix escaping of various fields in state files
parse_env_file() applies a certain kind of unescaping, and we really
need to match that when writing out arbitrary strings.

(This gets a bit confusing in the inhibit case, since that already
applied one level of escaping on its own...)
2025-05-21 17:33:40 +02:00
Lennart Poettering
019c8ea26a logind: port logind state files to fopen_tmpfile_linkable()
This replaces use of fopen_temporary() with fopen_tmpfile_linkable() +
flink_tmpfile(). This both shortens the code and means we use O_TMPFILE
for installing these files, which is always good.

No change in behaviour otherwise.
2025-05-21 17:33:40 +02:00
Lennart Poettering
e27333b2cc env-file: add helper for printing a properly escaped env var file assignment 2025-05-21 17:33:40 +02:00
Daan De Meyer
d9eadbbca0 portable: Fix comment 2025-05-21 23:59:28 +09:00
Daan De Meyer
0bbd8e18ed systemctl: Clean up includes
Split out of #37344.
2025-05-21 23:59:03 +09:00
Daan De Meyer
dc59a1517d udev: Clean up includes
Split out of #37344.
2025-05-21 23:57:31 +09:00
Daan De Meyer
5cf0b3b5bc sysupdate: Clean up includes
Split out of #37344.
2025-05-21 23:53:40 +09:00
Daan De Meyer
54f3008a1e pretty-print: Add missing fileio.h include
LONG_LINE_MAX comes from fileio.h and is used in pretty-print.h so
pretty-print.h should include it.
2025-05-21 23:53:40 +09:00
Daan De Meyer
6ee31a53a9 nspawn: Clean up includes
Split out of #37344.
2025-05-21 23:52:20 +09:00
Daan De Meyer
284d76414e resolve: Clean up includes
Split out of #37344.
2025-05-21 23:50:31 +09:00
Daan De Meyer
572c1fe685 home: Clean up includes
Split out of #37344.
2025-05-21 23:46:47 +09:00
Yu Watanabe
ed13e7533b Various cleanups (#37531) 2025-05-21 23:43:19 +09:00
Luca Boccassi
d6fd111e8e mkosi: update debian commit reference to 4ed8fd38c7b1579da6343c713adf0c33040cfc33
* 4ed8fd38c7 Install new files for upstream build
2025-05-21 13:14:35 +01:00
Daan De Meyer
1971631294 meson: Don't define targets for standalone binaries if option is not enabled
These are built from the same sources as the regular binaries, so we
end up with the same sources multiple times in the compilation database
but with different command line arguments, which trips up tooling that
uses the compilation database. Let's not define the standalone targets if
the option is not enabled to avoid this problem.
2025-05-21 14:05:58 +02:00
Daan De Meyer
cdd5fac068 tree-wide: Include <libaudit.h> via libaudit-util.h
Let's keep the ifdeffery for the include in one place.
2025-05-21 14:05:56 +02:00
Daan De Meyer
9f23910935 tests: Move implementation of DEFINE_HEX_PTR() into source file
Otherwise we have to add a hexdecoct.h include to tests.h which we
want to avoid.
2025-05-21 13:59:18 +02:00
Daan De Meyer
9f74f56f36 test-tables: Pass enum type to test_table() as well
clang-include-cleaner has a hard time figuring out unused includes
with all the macro string concatentation we're doing in test_table().
Let's help it out a little by also passing the enum type into test_table().

While technically not needed, this makes the tests a bit more self-descriptive
and not really much more verbose so it feels like a good chance regardless,
even if the primary purpose is to help clang-include-cleaner figure out
used and unused includes.
2025-05-21 13:24:42 +02:00
Daan De Meyer
44599b20bc stat-util: Use typeof_field() in one more place 2025-05-21 13:24:42 +02:00
Yu Watanabe
ef27ebab08 Clean up more includes (#37527)
Split out of #37344
2025-05-21 19:43:39 +09:00
TheHillBright
3308414531 journald: clarify doc for usage-related values cap (#37528)
The old description makes users wrongly assume that the cap of 4G
applied, even when the user specifies a value that will result in higher
than 4G. This commit avoids this misunderstanding.
2025-05-21 19:38:12 +09:00
Yu Watanabe
c6a116b076 Bugprone argument comment 6 (#37507)
Follow up from https://github.com/systemd/systemd/pull/37481
2025-05-21 19:29:58 +09:00
Jelle van der Waa
2f0037d9fb bpf-socket-bind: rename 'u' to 'unit'
Follow argument comment naming.
2025-05-21 10:58:32 +02:00
Jelle van der Waa
26b5eea47f sd-login: rename sd_seat_get_active arguments
Follow the argument comment naming.
2025-05-21 10:50:48 +02:00
Jelle van der Waa
c670f828f1 sd-bus: rename cookie to ret_cookie
Follow the argument comment naming.
2025-05-21 10:50:25 +02:00
Jelle van der Waa
00299a80f7 sd-event: rename 's' -> 'ret' 2025-05-21 10:50:25 +02:00
Jelle van der Waa
bc2b127763 journal-sync: rename ss to stream
Follow the argument comment name.
2025-05-21 10:50:25 +02:00
Jelle van der Waa
dfd496b02e efivars: rename ret -> ret_data
Follow the used argument comment naming.
2025-05-21 10:50:25 +02:00
Jelle van der Waa
26208dd49f dbus-manager: correct argument comment 2025-05-21 10:50:25 +02:00
Jelle van der Waa
d0ae0e4f07 pretty-print: correct argument comment 2025-05-21 10:50:25 +02:00
Jelle van der Waa
d8b9f67e67 treewide: fix header file definitions 2025-05-21 10:50:25 +02:00
Jelle van der Waa
6333b3b88d core: rename p -> parameters 2025-05-21 10:50:25 +02:00
Daan De Meyer
9301880442 timesync: Clean up includes
Split out of #37344.
2025-05-21 10:49:43 +02:00
Daan De Meyer
8c30d82664 oom: Clean up includes
Split out of #37344.
2025-05-21 10:49:42 +02:00
Daan De Meyer
7a30bc9ad6 shared: Introduce conf-parser-forward.h
conf-parser.h pulls in a lot of other headers as needed by all the
macros it defines. We can't easily move the implementations of these
macro to conf-parser.c, so let's instead introduce conf-parser-forward.h
with just the stuff in it needed by other header files.

We'll make use of this when cleaning up includes to only include the
minimal parts of conf-parser.h that are required by other headers without
pulling in the kitchen sink.
2025-05-21 10:49:42 +02:00
Daan De Meyer
dadd36894c fuzz: Clean up includes
Split out of #37344.
2025-05-21 10:49:42 +02:00
Daan De Meyer
fa34123c35 test: Clean up includes
To make sure everything still compiles, we add a preliminary include
of forward.h to tests.h to make sure it is included in every test source
file. We'll clean up the tests.h includes in a later commit.

We also add a <errno.h> include to errno-list.h to keep test-errno-list.c
compiling. It'll be removed again when we clean up includes in src/basic.

Split out of #37344.
2025-05-21 10:49:42 +02:00
Daan De Meyer
86b9a3e31d tree-wide: Clean up includes
This removes more unused includes from the components already cleaned
up in #37467 and #37457.

Split out of #37344.
2025-05-21 10:49:42 +02:00
Daan De Meyer
8b5ce49591 basic: Include time-util.h in constants.h
constants.h defines a bunch of constants that use macros from
time-util.h, so add the needed include. To avoid cyclic dependencies,
we move the HAS_FEATURE_MEMORY_SANITIZER and HAS_FEATURE_ADDRESS_SANITIZER
logic to macro.h and get rid of the constants.h include there.

The rest of this commit is adding missing constants.h includes where
needed due to it being removed from macro.h.
2025-05-21 10:49:42 +02:00
Daan De Meyer
98ff8a198b macro-fundamental: Introduce typeof_field() 2025-05-21 10:49:37 +02:00
Daan De Meyer
e97cd0ca9f icmp6-packet: Fix typo 2025-05-21 10:37:18 +02:00
Daan De Meyer
4cb9717bdc pcre2-util: Make sure PatternCompileCase enum is named 2025-05-21 10:37:18 +02:00
Daan De Meyer
4c26a68f7b forward.h: Add forward declaration of BusObjectImplementation 2025-05-21 10:12:19 +02:00
Zbigniew Jędrzejewski-Szmek
138e9f7afb kernel-install/90-loaderentry.install: print message if quiting (#37522)
60-ukify.install prints a message like this, and it is quite useful when
trying to figure out what is going on.
2025-05-21 09:55:27 +02:00
Lennart Poettering
8193066c0f update TODO 2025-05-21 07:13:19 +02:00
Lennart Poettering
18fa37a62c Prettify bootctl status (#37524) 2025-05-21 07:10:07 +02:00
Lennart Poettering
81a1f8eeba resolved: add new "DNS Delegate" concepts (#34368)
Various long standing issues (at least: #5573 #14159 #20485 #21260
#24532 #32022 #18056) have been asking for a way to delegate DNS
resolution of specific domains to very specific DNS servers.

This PR goes a major step towards that goal by adding a new concept "DNS
Delegate" which allows to configure just that. Basically, this adds a
third kind of DNS scope to resolved's logic: besides the per-link and
global DNS scopes there are now also "delegate" scopes, which can be
created by dropping in a new file /etc/systemd/dns-delegate/*.conf. They
carry DNS= and Domains= lines just like the global setting or what the
per-link configuration can carry.

And they are consulted the same way as link DNS scopes are considered,
following the same routing rules.

This allows to configure these DNS delegates statically via drop-in
files as mentioned, and only adds the most basic functionality. Later on
we might want to extend this:

1. Allow dynamic creation of DNS delegates via IPC with lifecycle bound
to IPC client (usecase: installing a DNS delegate that routes traffic to
some DNS-over-TLS server once basic setup is complete).
2. Allow configuration of protocol details per delegate the same way
this is currently allowed per-link.
3. Instead of strictly using DNS as delegation protocol, support an
alternative varlink based protocol (without retransmission problems and
so on) that systemd-machined and similar can implement.

This PR is not complete yet. Lacks docs and tests. Seems to work fine in
my local tests however.

Fixes: #5573
Fixes: #18056
Fixes: #20485
2025-05-21 00:32:07 +02:00
Lennart Poettering
88d2cb3668 test: add simple integration test for delegation feature 2025-05-20 23:00:53 +02:00
Lennart Poettering
89768b601b man: document dns-delegate files 2025-05-20 23:00:53 +02:00
Lennart Poettering
45817e9245 resolvectl: show delegate information, too 2025-05-20 23:00:53 +02:00
Lennart Poettering
5c45b341d3 resolvectl: rework parsing of dns server + search domain bus properties
Let's handle the per-link and the global dns server/search domain
property parsing the same. Let's use a flags field for three separate
booleans, and unify more code.
2025-05-20 23:00:53 +02:00