1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
Commit Graph

67842 Commits

Author SHA1 Message Date
Lennart Poettering
6fd38dc83a killall: suppress debug log if some cgroup doesn't have survive_final_kill_signal xattr set
This is the default case, hence really no reason to be noisy about that.
2023-10-11 11:39:48 +02:00
Lennart Poettering
58f1bd9b4a bpf-lsm: suppress noisy debug log message if we remove a unit from the bpf-lsm table where it was never added
There's really no point in logging about one of the most common cases we
have: that no BPF-LSM policy was installed for a specific unit.
2023-10-11 11:39:48 +02:00
Lennart Poettering
91a6447607 fdset: improve debug logging for left-over fds
Let's show which fds are closed as part of the left-over fd set logic on
daemon reload/reexec cycles.

This is useful to debug accidentally unclaimed fds.
2023-10-11 11:39:48 +02:00
Lennart Poettering
bde7e12255 limits-util: suppress noisy debug message when reading tasks in top-level cgroup
We have the "tasks.max" cgroup attribute only if we run in a cgroup
namespace, but not on the host. Hence let's handle ENODATA silently
simply to reduce the debug noise generated.
2023-10-11 11:30:53 +02:00
Lennart Poettering
98d8c37595
Merge pull request #29427 from ddstreet/cryptenroll_specify_handle_index
Cryptenroll specify handle index
2023-10-11 10:47:01 +02:00
Roland Hieber
7c6dd20046 sd-gpt: add defines for big-endian MIPS/MIPS64
According to the respective change in the DPS:
<https://github.com/uapi-group/specifications/pull/86>

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
2023-10-11 10:10:49 +02:00
Lennart Poettering
79d956db34 namespace: make setup_namespace() less crazy
Let's replace the ridiculous number of arguments with a structure, to
make this function less weird.

No change in behaviour, just some refactoring.
2023-10-11 12:39:30 +09:00
Lennart Poettering
22d7fb6646 docs: document that in future we'll do EV_EVENT_TAG only, no EV_IPL 2023-10-10 23:31:33 +01:00
Mike Yuan
e533dad10f loginctl: *-status: set minimum table column width if extra info will be printed
Follow-up for bf366954fa

Before this commit, we hardcode "prefix" to the widest field
possible in the table. However, there's no guarantee that the
field would actually be used/added, so it could potentially
result in misalignment. Therefore, let's set the minimum width
of the cell to the hardcoded width too.
2023-10-10 23:30:52 +01:00
Mike Yuan
8fff78a1dd networkctl: use proper vertical table for status
Also modernize macro definition and error handling.
2023-10-10 23:28:28 +01:00
Dan Streetman
9c18019787 tpm2: don't use GetCapability() to check transient handles
The kernel tpm "resource manager" interface doesn't report that any transient
handles exist, even if they do, so don't bother asking if the handle is
transient.
2023-10-10 16:55:39 -04:00
Laszlo Gombos
63947fede8 man: fix example for systemd.swap-extra 2023-10-10 21:44:45 +02:00
Lennart Poettering
66cd3537f9 dissect: don't show non-JSON arch + sector size in JSON mode 2023-10-10 21:44:20 +02:00
Abderrahim Kitouni
e8868e8354 doc-sync: add support for uploading the documentation for main
It will refuse running on any other branch than main or stable branches.

Also update the release instructions to run it on the stable branch.
2023-10-10 17:50:04 +01:00
Mike Yuan
3759a17418 man/systemd.exec: document behavior of SetLoginEnvironment= when unset
Follow-up for 854eca4a95

Addresses https://github.com/systemd/systemd/pull/29493#discussion_r1351980046
2023-10-10 12:08:32 +01:00
Dan Streetman
1524184dd1 tpm2: do not call Esys_TR_Close()
Unfortunately, the tpm2-tss library doesn't reference count handles, and a call
to Esys_TR_Close() will remove the handle that could be in use by other
code. So stop calling Esys_TR_Close(), and leave the handle around until we
cleanup the entire ESYS_CONTEXT.
2023-10-10 05:56:45 -04:00
Dan Streetman
adcd3266ec test: add tests for systemd-cryptenroll --tpm2-seal-key-handle
In TEST-70-TPM2, test systemd-cryptenroll --tpm2-seal-key-handle using the
default (0) as well as the SRK handle (0x81000001), and test using a non-SRK
handle index after creating and persisting a primary key.

In test/test-tpm2, test tpm2_seal() and tpm2_unseal() using default (0), the SRK
handle, and a transient handle.
2023-10-10 05:56:45 -04:00
Dan Streetman
382bfd90c3 cryptenroll: allow specifying handle index of key to use for sealing
This defaults to the SRK index.
2023-10-10 05:40:27 -04:00
Lennart Poettering
b5ac77e9a5
Merge pull request #29493 from YHNdnzj/unit-always-set-user-home
core/execute: always set $USER and introduce SetLoginEnvironment=
2023-10-10 10:16:07 +02:00
Luca Boccassi
795e80c7ed
Merge pull request #29507 from abderrahim/doc-sync-improvement
Improvements to the doc-sync target
2023-10-10 08:59:33 +01:00
Luca Boccassi
d843ad28fd
Merge pull request #28699 from bluca/dtb_addon
stub: add support for dtb addons
2023-10-10 08:58:54 +01:00
Luca Boccassi
375991c0b5 Update TODO 2023-10-09 22:22:09 +01:00
Luca Boccassi
12de4ed1ca boot: measure loader.conf in PCR5
Results in:

- EventNum: 26
  PCRIndex: 5
  EventType: EV_EVENT_TAG
  DigestCount: 4
  Digests:
  - AlgorithmId: sha1
    Digest: 155fb999ca61ba8c7b1f1d87cee821f772ef084a
  - AlgorithmId: sha256
    Digest: 4c26adf231603613afc00bb3d5cad046aec6a525ca01262417c7085caab452b5
  - AlgorithmId: sha384
    Digest: 3e0758cb6605ac274e55d747bf29ee3474fc4413cd5e7a451d1375219cd7f08a30fc915a8df7131657ca78b82b9ccec8
  - AlgorithmId: sha512
    Digest: e32d905b9092c543802f386db9a397d9b6593bdb8360fb747a6d23e491a09595fec8699184cc790d0873a3d52ed16d045538f0c73ece48278fae0fb6ed9b4ed6
  EventSize: 32
  Event: 2a58bcf5180000006c006f0061006400650072002e0063006f006e0066000000
2023-10-09 22:22:09 +01:00
Luca Boccassi
3e6f010e03 stub: measure all cmdline addons together 2023-10-09 22:22:09 +01:00
Luca Boccassi
68f85761e2 stub: add support for dtb addons
Same as kernel command line addons.
2023-10-09 22:22:09 +01:00
Luca Boccassi
3b66a6764e Move CLEANUP_ARRAY to src/fundamental 2023-10-09 22:22:09 +01:00
Luca Boccassi
3e5a499009 efi: add xmemdup 2023-10-09 22:22:09 +01:00
Luca Boccassi
d869ec4ab0 efi: add EFI_TCG2_TAGGED_EVENT and helpers 2023-10-09 22:22:09 +01:00
Luca Boccassi
70def6fed3 mkosi: use different configs for Debian kernel package list
The kernel package is named after the architecture, so builds will
fail if mkosi --architecture arm64 is used
2023-10-09 22:19:00 +01:00
Frantisek Sumsal
c4eb888740 test: make the DDI tests work with older openssl
Older openssl unfortunately insists on having a config file with certain
fields, so let's reuse the one we already create in previous tests.

Should address following error on C8S:

[  407.812039] testsuite-50.sh[654]: + openssl req -config /dev/null -subj=/CN=waldo -x509 -sha256 -nodes -days 365 -newkey rsa:4096 -keyout /tmp/test-50-privkey.key -out /tmp/test-50-cert.crt
[  407.849089] testsuite-50.sh[2325]: Generating a RSA private key
[  408.947853] testsuite-50.sh[2325]: ..................................++++
[  423.100903] testsuite-50.sh[2325]: ..........++++
[  423.111036] testsuite-50.sh[2325]: writing new private key to '/tmp/test-50-privkey.key'
[  423.115036] testsuite-50.sh[2325]: -----
[  423.117842] testsuite-50.sh[2325]: unable to find 'distinguished_name' in config
[  423.120863] testsuite-50.sh[2325]: problems making Certificate Request
[  423.123448] testsuite-50.sh[2325]: 140737354091984:error:0E06D06C:configuration file routines:NCONF_get_string:no value:crypto/conf/conf_lib.c:273:group=req name=distinguished_name

Follow-up to 99d9edf0bd.
2023-10-09 18:54:23 +01:00
Luca Boccassi
ace07128ac dissect: avoid clobbering device-mapper error when activating verity
The device-mapper driver can return a wild variety of errors when trying
to activate the same dm-verity volume concurrently, as it might happen
with an image. There is a fallback logic in place, but the original
return code was clobbered when userspace signature check was added.
Add it back.

Follow-up for c2fa92e7e8
2023-10-09 18:41:16 +01:00
Abderrahim Kitouni
00fc4a3945 doc-sync: automatically detect whether we're updating the latest version
also update the release instructions to push release candidates to -stable
2023-10-09 18:37:41 +01:00
Abderrahim Kitouni
75481bebc1 doc-sync: add man/ to the passed directory
This mirrors the behaviour before multiple version support
2023-10-09 18:03:57 +01:00
Mike Yuan
854eca4a95
core/execute: always set $USER and introduce SetLoginEnvironment=
Before this commit, $USER, $HOME, $LOGNAME and $SHELL are only
set when User= is set for the unit. For system service, this
results in different behaviors depending on whether User=root is set.

$USER always makes sense on its own, so let's set it unconditionally.
Ideally $HOME should be set too, but it causes trouble when e.g. getty
passes '-p' to login(1), which then doesn't override $HOME. $LOGNAME and
$SHELL are more like "login environments", and are generally not
suitable for system services. Therefore, a new option SetLoginEnvironment=
is also added to control the latter three variables.

Fixes #23438

Replaces #8227
2023-10-10 00:00:26 +08:00
Mike Yuan
1c9433559a
core/execute: modernize get_fixed_{user,group}
No functional change, preparation for later commit.
2023-10-09 23:40:58 +08:00
Mike Yuan
59026bccd0
core/execute: use FOREACH_ARRAY in one more place 2023-10-09 23:40:57 +08:00
Abderrahim Kitouni
3c1f396f69 man: support multiple versions of the documentation on the website
This changes the doc-sync meson target from a simple rsync command to a
script that:

* puts the documentation in a subdirectory according to the version
* injects a bit of javascript to add a drop-down to switch between versions
* updates an index.json file with the newly uploaded version
* keeps the latest/ directory up to date with the latest version
* supports a --no-latest switch to be used when uploading older versions
2023-10-09 11:16:20 +01:00
Luca Boccassi
00dd4e78f6
Merge pull request #29495 from yuwata/network-manager-state-file
network: fixlets for manager state file
2023-10-08 22:46:44 +01:00
Luca Boccassi
6bcc7bcf20
Merge pull request #29490 from yuwata/network-tc-fixes
network: several fixes for traffic control support
2023-10-08 22:31:26 +01:00
Martin Beneš
fc48807d29 add udev rule for micmute (f20) 2023-10-08 15:41:13 +01:00
Yu Watanabe
2d7ca6b45d test-network: add test for DHCPv6 information requesting mode
For issue #28566.
2023-10-08 16:31:59 +09:00
Yu Watanabe
9709f9edc5 network/dhcp6: keep lease when running in information request mode
Fixes #28566.
2023-10-08 16:22:29 +09:00
Yu Watanabe
814d8f962f network/dhcp6: shorten dhcp6_handler()
Note, currently dhcp6_lease_information_acquired() do nothing, so this
does not change any behavior.
2023-10-08 16:18:49 +09:00
Yu Watanabe
34290c6aa9 test-network: test for NTP servers by DHCPv6 protocol
For issue #29148.
2023-10-08 15:45:35 +09:00
Yu Watanabe
86a66e9b95 network: also save NTP servers and friends obtained by other protocols
Previously, only servers that statically configursd or obtained by
DHCPv4 protocol are saved in the manager state file.

NTP servers obtained by DHCPv6 could not be used by timesyncd.

Fixes #29148.
2023-10-08 13:06:28 +09:00
Piotr Drąg
c51ecf3117 po: add a false positive to POTFILES.skip
Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect this file as containing translations. Avoid this
behavior by putting the file in POTFILES.skip.
2023-10-07 16:21:37 +01:00
Lennart Poettering
a81577961c core: refactor compare_job_priority()
Let's move it out of cgroup.[ch]. The function primarily compares the
priority values for units, hence let's move the core of it into a new
function unit_compare_priority() in unit.[ch], and then make
compare_job_priority() a local wrapper for it in manager.[ch]

Shorten the code a bit while we are at it.
2023-10-07 22:22:00 +09:00
Yu Watanabe
328539c21c
Merge pull request #29482 from poettering/cgroup-func-rename
core: various clean-ups in cgroup.[ch] and around
2023-10-07 22:18:14 +09:00
Yu Watanabe
8fc7e073e3 test-network: extend testcase for tbf
For issue #29485.
2023-10-07 21:35:16 +09:00
Yu Watanabe
9e4d87166f network/tc: support Parent=X:0 for qdiscs
When the minor part of the parent handle is zero, let's check if the
corresponding qdisc exists, rather than tc class.
2023-10-07 21:35:16 +09:00