1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00
Commit Graph

56191 Commits

Author SHA1 Message Date
bearhoney
d0515a289a Update CODING_STYLE.md
Fixed typo.
2022-02-07 10:46:22 +00:00
Evgeny Vereshchagin
be1eae4fad tests: also fuzz packets sent in the DHCP6_STATE_SOLICITATION state
With aborts enabled the fuzzer can catch issues like
26a63b8132
Let's extend it a bit to let it cover issues like
https://github.com/systemd/systemd/pull/22406#discussion_r798932098
2022-02-05 14:50:12 +09:00
Thomas Haller
58da18251f sd-dhcp6-client: fix sending prefix delegation request during rebind
Fixes an assertion failure "pd->type == SD_DHCP6_OPTION_IA_PD" in dhcp6_option_append_pd().

Something similar was done in commit 26a63b8132 ('sd-dhcp6-client: Fix
sending prefix delegation request (#17136)'). The justification is
probably the same.
2022-02-05 14:11:33 +09:00
Yu Watanabe
ea853de57d network: enable KeepConfiguration= when running on network filesystem
Also, set KeepConfiguration=dhcp-on-stop by default when running in
initrd.

Fixes #21967.
2022-02-05 09:42:32 +09:00
Yu Watanabe
166e8e36eb
Merge pull request #22416 from fbuihuu/misc
Misc
2022-02-05 09:26:40 +09:00
Anita Zhang
a714b15d46
Merge pull request #22395 from benzea/benzea/oomd-dump-offenders
oomd: Dump top offenders after a kill action
2022-02-04 14:44:04 -08:00
Benjamin Berg
29f4185a9c oomd: Dump top offenders after a kill action
This hopefully makes it more transparent why a specific cgroup was
killed by systemd-oomd.
2022-02-04 20:00:35 +01:00
Lennart Poettering
a2012854f5 man: systemd-stdio-bridge doesn't connect "two busses"
In D-Bus, clients connect to a bus (the usual case), or use direct
questions to each other (the unusual case). A bus is a program one can
connect to and implemented by dbus-daemon or dbus-broker. HOwever,
busses never connect between each other, that doesn't exist. Hence don't
claim so.

This is probably confusion about the fact that sd-bus calls D-Bus
connection objects just "sd_bus" for simplicity, given they are used in
99% of the cases to connect to a bus — only in exceptional cases they
are used for direct connections between peers without involving a bus.

Follow-up for b7bb58ef70
2022-02-04 17:43:44 +00:00
Lennart Poettering
d94e8a5064 journal-file: explicitly handle file systems that do not support hole punching
Apparently the error code fallocate() returns if hole punching is not
supported is not too well defined (man page just says "an error is
returned"), hence let's accept the usual set of errors, and the
normalize it to EOPNOTSUPP, and generate a clear error message in this
case.
2022-02-04 16:37:39 +01:00
Lennart Poettering
47497593fa journal-file: fix error handling of pread() in journald_file_punch_holes() 2022-02-04 16:37:20 +01:00
Lennart Poettering
05aca54468
Merge pull request #22378 from bluca/on_fail_follow_ups
Follow-ups for #20833
2022-02-04 16:29:09 +01:00
Lennart Poettering
3474ee526a
Merge pull request #22375 from michaelolbrich/watchdog
fix watchdog handling during reboot
2022-02-04 16:28:41 +01:00
Ruben Kerkhof
331f44c149 systemd.netdev(5): fix acronym for DOVE extensions 2022-02-05 00:10:20 +09:00
Michael Olbrich
119d5126d1 shutdown: don't stop the watchdog
This basically reverts #22079.

Stopping the watchdog is wrong. The reboot watchdog is supposed to cover
the whole time from the point when systemd start systemd-reboot until the
hardware resets.
Otherwise the system may hang in the final shutdown phase.

Add a comment, why keeping the watchdog running is correct here.
2022-02-04 12:26:58 +01:00
Michael Olbrich
f4b1a6b641 watchdog: fix watchdog_set_device() when the default watchdog device is used
If watchdog_set_device() is not called before open_watchdog() then
'watchdog_device' remains 'NULL' while the device is open.

As a result, the "same device" check in watchdog_set_device() does not work
correctly: If no device is specified (e.g. from watchdog_free_device())
then the current fd is not closed.

Fix this by setting 'watchdog_device' to the correct device during
open_watchdog()
2022-02-04 12:26:58 +01:00
Franck Bui
e36b00e938 udev/net_id: show the correct identifier in the debug output of dev_pci_onboard() 2022-02-04 09:45:47 +01:00
Franck Bui
05c05dc0a3 core: make use of VALID_CHARS_WITH_AT in unit_name_is_valid() 2022-02-04 09:36:45 +01:00
Yu Watanabe
4e247216e5 stat-util: introduce path_is_network_fs() 2022-02-04 15:22:20 +09:00
Yu Watanabe
318a53d10a network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
To emphasize this is DHCPv4. No behavior is changed.
2022-02-04 13:59:42 +09:00
Davide Cavalca
2b560c6e54 hwdb: add HP calculators 2022-02-04 11:01:20 +09:00
Lennart Poettering
e6fccf029b hostnamed: trivial optimization 2022-02-03 22:51:51 +00:00
Luca Boccassi
1d2bf1f0ee portable: reopen socket with O_RDONLY
Follow-up for e3f7ed944a
2022-02-03 22:50:56 +00:00
Luca Boccassi
75844b44ee
Merge pull request #22408 from mrc0mmand/test-network-cleanup
test-network: code cleanup
2022-02-03 22:50:38 +00:00
Anita Zhang
d83923bdb7
Merge pull request #22355 from yuwata/network-tunnel-external
network: tunnel: support external mode
2022-02-03 14:20:43 -08:00
Jan Janssen
ce5e7872f8 boot: Fix some error messages 2022-02-03 23:05:36 +01:00
Anita Zhang
1f087147ea
Merge pull request #22400 from poettering/resolved-single-invalid-list
resolved: maintain only a single list of "dont-resolve" domain names
2022-02-03 11:54:00 -08:00
Lennart Poettering
ff28d259c0 hostnamed: drop "iteractive" parameter from GetHardwareSerial()
Since a long time the D-Bus spec knows a special bit in its message
header for indicating that "interactive" authentication is OK. The
original hostnamed API is before that was added hence most functions
expose that boolean as explicit argument.

For new added functions let's get rid of it, the message flag is good
enough and replaces it with complete functionality.

No new APIs should carry the "interactive" boolean flag explicitly as
argument anymore.

Follow-up for: 9697662915
2022-02-03 19:52:18 +00:00
Anita Zhang
79decacff0
Merge pull request #22394 from bluca/requires_restart_doc
man: explicitly mention that Requires propagates restarts
2022-02-03 11:50:06 -08:00
Lennart Poettering
f80c3d5c7a systemctl: use STR_IN_SET() where appropriate
Follow-up for: 8e98568165
2022-02-03 18:56:53 +00:00
Frantisek Sumsal
87bf983c55 test-network: disable irrelevant or one-time pylint checks 2022-02-03 19:31:15 +01:00
Frantisek Sumsal
54e2f32f50 test-network: use specific exceptions instead of the Exception class 2022-02-03 19:30:11 +01:00
Frantisek Sumsal
a561bceeaa test-network: avoid name clashing/redefinition 2022-02-03 19:20:42 +01:00
Frantisek Sumsal
524cc9d1d8 test-network: disable 'no-member' warning for the Utilities class
The warning is correct, since we don't inherit the necessary
unittest.TestCase class, but that's on purpose, since the Utilities
class is not supposed to be instantiated on its own, but should
complement other classes' definitions which do inherit from the
unittest.TestCase class.
2022-02-03 19:13:06 +01:00
Frantisek Sumsal
283863a116 test-network: use raw strings for regexes with backslashes
It currently works because `\(` and `\)` are not valid escape sequences,
so they're not treated differently. Using raw strings (or double
backslashes) is a more correct solution.
2022-02-03 18:55:12 +01:00
Frantisek Sumsal
535e8107ee test-network: explicitly set check=False for subprocess.run()
since we're checking the returned error code explicitly via the
`returncode` member.
2022-02-03 18:49:35 +01:00
Frantisek Sumsal
f7805a6c79 test-network: convert certain multiline strings to comments
Multiline comments are converted to docstrings only when they're the
first statement in a function/method. Even though they're still a no-op
otherwise, let's use "true" comments to make pylint happy.
2022-02-03 18:42:41 +01:00
Frantisek Sumsal
45dbd0b945 test-network: drop unused variables 2022-02-03 18:18:29 +01:00
Frantisek Sumsal
19aa7f99c7 test-network: drop unnecessary else statements 2022-02-03 18:18:29 +01:00
Frantisek Sumsal
6983bb0e5e test-network: drop unnecessary semicolons 2022-02-03 18:18:27 +01:00
Frantisek Sumsal
83bceef027 test-network: drop superfluous parens 2022-02-03 18:10:06 +01:00
Lennart Poettering
f4526f82c9 resolved: maintain only a single list of "dont-resolve" domain names
Follow-up for: 46b53e8035
2022-02-03 17:16:11 +01:00
Luca Boccassi
cbfa043149 man: explicitly mention that Requires propagates restarts
It's implicit, but the actions are different, so let's be explicit to
avoid any confusion.
2022-02-03 14:48:27 +00:00
Leviticoh
f83da717d9 fix italian translations to display unit name 2022-02-03 23:05:58 +09:00
Lennart Poettering
0bf78c12b1 boot: fix pretty nasty typo
Note to self: should I ever become a black hat hacker, this is how I'd
hide a vulnerability. ;-)

(No, this one is not a vulnerability)

Follow-up for: 163d1ea5dd
2022-02-03 14:57:35 +01:00
Lennart Poettering
5d04cec867 journal: when copying journal file to undo NOCOW flag, go via fd
We have the journal file open already, hence reference it via the fd
insted of the file name. After all, some other tool might have
renamed/deleted it already.

Let's not actually reuse the fd though, since we want a separate file
offset for the copying, hence just make it simply and reopen via
/proc/self/fd/.

Follow-up for d71ece3f0b
2022-02-03 11:34:24 +01:00
Evgeny Vereshchagin
be496d6a9b tests: pass FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION to fuzzers
to let them use reproducible identifiers, which should make it possible
to really use files copied from OSS-Fuzz to reproduce issues on
GHActions and locally. Prompted by https://github.com/systemd/systemd/pull/22365
2022-02-03 08:56:00 +00:00
Lennart Poettering
362c62296a sd-boot: rename LOADER_STUB → LOADER_UNIFIED_LINUX
No actual code changes, just renaming.

Rationale: the focus here should be on the fact that these are "unified"
images, whether our stub is used or not, or something else doesn't
really matter. Moreover, these are still Linux entries. Hence, emphasize
that these are *unified* images, and *Linux* images, and deemphesize
that our sd-stub is likely used.
2022-02-03 13:44:28 +09:00
Evgeny Vereshchagin
697bb76589 tests: fuzz client_send_message
to make sure outgoing packets based on incoming packets are fine.
It's just another follow-up to
https://github.com/systemd/systemd/pull/10200.
Better late than never :-)
2022-02-03 13:43:49 +09:00
Yu Watanabe
7809cab717 test-network: add testcase for external tunnel 2022-02-03 11:12:34 +09:00
Yu Watanabe
1ae308abb5 network: tunnel: support external mode
Closes #22352.
2022-02-03 11:12:01 +09:00