summaryrefslogtreecommitdiffstats
path: root/units/systemd-nsresourced.service.in (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-09-09machinectl: suppress redirection notice if --quiet is specifiedLennart Poettering1-1/+2
2024-09-09core: Add support for PrivateUsers=identityDaan De Meyer14-48/+191
This configures an indentity mapping similar to systemd-nspawn --private-users=identity.
2024-09-09update keyboard hwdb to add acer Predator PHN16-72Yanqing Jing1-0/+4
2024-09-09sysupdate: Add --transfer-source=Daan De Meyer7-7/+58
In mkosi, I want to add a sysupdate verb to wrap systemd-sysupdate. The definitions will be picked up from mkosi.sysupdate/ and passed to systemd-sysupdate. I want users to be able to write transfer definitions that are independent of the output directory used by mkosi. To make this possible, it should be possible to specify the directory that transfer sources should be looked up in on the sysupdate command line. Let's allow this via a new --transfer-source= option. Additionally, transfer sources that want to take advantage of this feature should specify PathRelativeTo=directory to indicate the configured Path= is interpreted relative to the tranfer source directory specified on the CLI. This allows for the following transfer definition to be put in mkosi.sysupdate: """ [Transfer] ProtectVersion=%A [Source] Type=regular-file Path=/ PathRelativeTo=directory MatchPattern=ParticleOS_@v.usr-%a.@u.raw [Target] Type=partition Path=auto MatchPattern=ParticleOS_@v MatchPartitionType=usr PartitionFlags=0 ReadOnly=1 """
2024-09-09repart: Initialize split_name_format in copy_from_one()Daan De Meyer1-0/+4
Let's allow splitting the partitions from an existing disk image by initializing split_name_format when using --copy-from=.
2024-09-09missing_socket: drop unnecessary definitionsYu Watanabe3-44/+3
Now, we have copy of vm_sockets.h, hence these definitions are not necessary anymore.
2024-09-09missing_network: drop unnecessary definitionYu Watanabe6-5/+5
Now we have ipv6.h, hence the definition is not necessary anymore.
2024-09-09arphrd-list: use imported linux/if_arp.hYu Watanabe2-2/+2
2024-09-09linux: import more network related headers from v6.11-rc6Yu Watanabe24-0/+2689
Hopefully, no effective change.
2024-09-08terminal-util: correct fd validity checkMike Yuan1-1/+1
Follow-up for 14f594b995bbaea85456a4c26e5c07446a4c446e
2024-09-08Fix typo in escape.csamuelvw011-1/+1
2024-09-08TODO: fix typoErik Sjölund1-1/+1
2024-09-08Fix grammar in udevadm settle timeout messagemarginaldev1-1/+1
2024-09-07nspawn: enable FUSE in containersLuke T. Shumaker5-7/+187
Linux kernel v4.18 (2018-08-12) added user-namespace support to FUSE, and bumped the FUSE version to 7.27 (see: da315f6e0398 (Merge tag 'fuse-update-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse, Linus Torvalds, 2018-06-07). This means that on such kernels it is safe to enable FUSE in nspawn containers. In outer_child(), before calling copy_devnodes(), check the FUSE version to decide whether enable (>=7.27) or disable (<7.27) FUSE in the container. We look at the FUSE version instead of the kernel version in order to enable FUSE support on older-versioned kernels that may have the mentioned patchset backported ([as requested by @poettering][1]). However, I am not sure that this is safe; user-namespace support is not a documented part of the FUSE protocol, which is what FUSE_KERNEL_VERSION/FUSE_KERNEL_MINOR_VERSION are meant to capture. While the same patchset - added FUSE_ABORT_ERROR (which is all that the 7.27 version bump is documented as including), - bumped FUSE_KERNEL_MINOR_VERSION from 26 to 27, and - added user-namespace support these 3 things are not inseparable; it is conceivable to me that a backport could include the first 2 of those things and exclude the 3rd; perhaps it would be safer to check the kernel version. Do note that our get_fuse_version() function uses the fsopen() family of syscalls, which were not added until Linux kernel v5.2 (2019-07-07); so if nothing has been backported, then the minimum kernel version for FUSE-in-nspawn is actually v5.2, not v4.18. Pass whether or not to enable FUSE to copy_devnodes(); have copy_devnodes() copy in /dev/fuse if enabled. Pass whether or not to enable FUSE back over fd_outer_socket to run_container() so that it can pass that to append_machine_properties() (via either register_machine() or allocate_scope()); have append_machine_properties() append "DeviceAllow=/dev/fuse rw" if enabled. For testing, simply check that /dev/fuse can be opened for reading and writing, but that actually reading from it fails with EPERM. The test assumes that if FUSE is supported (/dev/fuse exists), then the testsuite is running on a kernel with FUSE >= 7.27; I am unsure how to go about writing a test that validates that the version check disables FUSE on old kernels. [1]: https://github.com/systemd/systemd/issues/17607#issuecomment-745418835 Closes #17607
2024-09-07NEWS: fix typoYu Watanabe1-2/+2
Follow-up for 7a3a49386cc49d3971531ea24efb84232c05cc86.
2024-09-07man/varlinkctl: fix typoYu Watanabe1-2/+2
Follow-up for 39ce86d19c7c3ac46b4afb546879ca8dcad1bdb2.
2024-09-07network/route: fix typoYu Watanabe1-1/+1
Follow-up for 195bb6f97ebc5cd5e9932c62aa80df5427c30d67.
2024-09-07core/manager: do not re-init Manager.lookup_paths when manager_reload()Mike Yuan1-7/+0
Follow-up for 99aad9a2b9e2c06023a2043976fd9395332ff097 The commit changed lookup_paths_init_or_warn() call to be fatal to manager_reload(), but invoke_main_loop() assumes that manager_reload() would only return recoverable error, and put the manager back to MANAGER_OK in that case, which is spurious. Looking at it more, it appears to be utterly unnecessary to reinitialize LookupPaths here, given that nothing during the reload process would change the search dirs. Let's drop the path altogether hence.
2024-09-07core/manager: rename NOTIFY_RCVBUF_SIZE to MANAGER_SOCKET_RCVBUF_SIZEMike Yuan1-6/+6
This is used for all our sockets, hence rename as so.
2024-09-07varlinkctl: downgrade ignored error msg to LOG_WARNINGMike Yuan1-1/+1
Follow-up for 39ce86d19c7c3ac46b4afb546879ca8dcad1bdb2
2024-09-07chattr-util: use BIT_FOREACH where appropriateMike Yuan1-4/+3
2024-09-07chattr-util: set O_NOCTTY when reopening O_PATH fdMike Yuan1-1/+2
Follow-up for 07862c9fc2becdc4bbe112b023591d2ab2dd032b
2024-09-07mkosi: Drop _fixperms workaroundDaan De Meyer2-2/+0
This was added to deal with a bug in the rpm 4.20 rc in Rawhide but since that's been fixed, let's drop the workaround.
2024-09-07docs: use actual docs/HACKING.md URLMichal Sekletar1-1/+1
2024-09-07nspawn: register_machine() and allocate_scope() bools to flagsLuke T. Shumaker3-14/+60
2024-09-07nspawn: re-flow comments that are wrapped weirdLuke T. Shumaker1-13/+6
2024-09-07test: add a testcase for unprivileged nspawnLuke T. Shumaker2-0/+85
Right now it mostly duplicates a test that already exists in TEST-50-DISSECT.mountfsd.sh, but it serves as a template for more unprivileged nspawn tests.
2024-09-07nspawn: convert copy_devnodes():devnodes from nulstr to strvLuke T. Shumaker1-12/+14
2024-09-07nspawn: fix the comment about which namespaces outer_child is inLuke T. Shumaker1-5/+13
The comment says that it is still in the host's CLONE_NEWUSER namespace, which is not true if !arg_privileged. Also, it says that the CLONE_NEWNS namespace was created by clone(), but if !arg_privileged then it was actually created by nsresource_allocate_userns() and switched into by setns(). Fix those inaccuracies. When trying to word it clearly, there are enough commas and nested clauses that I think it's clearer to break it into a list/table.
2024-09-07varlinkctl: add --timeout= switch to tweak time-out behaviourLennart Poettering2-22/+79
Fixes: #33772
2024-09-07dm-util: get rid of flex array in middle of structureLennart Poettering1-9/+17
Fixes: #33936
2024-09-06man: CAP_SYS_ADMIN does NOT grant any permission for dbus APITakeo Kondo1-2/+1
2024-09-06pcrlock: be more careful when preparing credential name for pcrlock policyLennart Poettering2-24/+48
The .cred suffix is stripped from a credential as it is imported from the ESP, hence it should not be included in the credential name embedded in the credential. Fixes: #33497
2024-09-06ukify: introduce new --measure-base= switchLennart Poettering2-8/+85
2024-09-06ukify: add new --extend= switch for importing an existing UKI's sections to ↵Lennart Poettering2-17/+119
later extend This options is pretty simple, it allows specifying an UKI whose sections to import first, and place at the beginning of the new UKI. This is useful for generating multi-profile UKIs piecemeal: generate the base UKI first, then append a profile, and another one and another one. The sections imported this way are not included in any PCR signature, the assumption is that that already happened before in the imported UKI.
2024-09-06ukify: add basic .profile supportLennart Poettering2-0/+20
This just allows including .profile sections, but doesn't try to be smart about it. This alone won't help you much to create valid multi-profile UKIs.
2024-09-06journald: mention the access mode we tried to open /dev/kmsg inLennart Poettering1-6/+4
Let's make clearer what we are going to use /dev/kmsg for: read/write or just writing. This hopefully should avoid confusion, such as the one #33975 is result of. (Also while we are at it, add one extra debug message). Fixes: #33975
2024-09-06NEWS: extend the userdb sshd_config NEWS entry a bitLennart Poettering1-2/+13
2024-09-06tpm2-util: introduce tpm2b_sensitive_data_erase_and_esys_freep() destructorLennart Poettering1-9/+18
Let's make sure we erase TPM2B_SENSITIVE_DATA structures reliably in all code paths.
2024-09-06cryptenroll/cryptsetup: allow combined signed TPM2 PCR policy + pcrlock policyLennart Poettering13-272/+698
So far you had to pick: 1. Use a signed PCR TPM2 policy to lock your disk to (i.e. UKI vendor blesses your setup via signature) or 2. Use a pcrlock policy (i.e. local system blesses your setup via dynamic local policy stored in NV index) It was not possible combine these two, because TPM2 access policies do not allow the combination of PolicyAuthorize (used to implement #1 above) and PolicyAuthorizeNV (used to implement #2) in a single policy, unless one is "further upstream" (and can simply remove the other from the policy freely). This is quite limiting of course, since we actually do want to enforce on each TPM object that both the OS vendor policy and the local policy must be fulfilled, without the chance for the vendor or the local system to disable the other. This patch addresses this: instead of trying to find a way to come up with some adventurous scheme to combine both policy into one TPM2 policy, we simply shard the symmetric LUKS decryption key: one half we protect via the signed PCR policy, and the other we protect via the pcrlock policy. Only if both halves can be acquired the disk can be decrypted. This means: 1. we simply double the unlock key in length in case both policies shall be used. 2. We store two resulting TPM policy hashes in the LUKS token JSON, one for each policy 3. We store two sealed TPM policy key blobs in the LUKS token JSON, for both halves of the LUKS unlock key. This patch keeps the "sharding" logic relatively generic (i.e. the low level logic is actually fine with more than 2 shards), because I figure sooner or later we might have to encode more shards, for example if we add further TPM2-based access policies, for example when combining FIDO2 with TPM2, or implementing TOTP for this.
2024-09-06iovec-util: add iovec_append() for appending to an existing iovecLennart Poettering3-0/+27
2024-09-06man: document that sd_bus_message_read_strv() happily spits out empty arrays ↵Lennart Poettering1-1/+3
as NULL Fixes: #34163
2024-09-06tree-wide: use UTMPX_FILE rather than _PATH_UTMPXLennart Poettering3-9/+9
Apparently _PATH_UTMPX is a glibc'ism. UTMPX_FILE is the same thing and what everyone else uses. Since they are otherwise equivalent, let's just switch.
2024-09-06test-utmp: replace UT_LINESIZE/UT_NAMESIZE/UT_HOSTSIZE with sizeof_field()Lennart Poettering1-12/+6
utmpx doesn't know these defines, hence fix them.
2024-09-06tree-wide: drop unnecessary utmp includesLennart Poettering2-2/+0
2024-09-06user-util: switch from utmp to utmpxLennart Poettering1-2/+2
We generally use utmpx instead of utmp (both are actually identical on Linux, but utmpx is POSIX, while utmp is not). Let's fix one left-over case. UT_NAMESIZE does not exist in utmpx world, it has no direct counterpart, hence let's just sizeof_field() to determine the size of the actual field. (which comes to the same result of course: 32).
2024-09-06coredump: set ProtectHome to read-onlyEtienne Cordonnier1-1/+1
In https://github.com/systemd/systemd/pull/5283/commits/924453c22599cc246746a0233b2f52a27ade0819 ProtectHome was set to true for systemd-coredump in order to reduce risk, since an attacker could craft a malicious binary in order to compromise systemd-coredump. At that point the object analysis was done in the main systemd-coredump process. Because of this systemd-coredump is unable to product symbolicated call-stacks for binaries running under /home ("n/a" is shown instead of function names). However, later in https://github.com/systemd/systemd/commit/61aea456c12c54f49c4a76259af130e576130ce9 systemd-coredump was changed to do the object analysis in a forked process, covering those security concerns. Let's set ProtectHome to read-only so that systemd-coredump produces symbolicated call-stacks for processes running under /home.
2024-09-06po: Translated using Weblate (French)Léane GRASSER1-8/+9
Currently translated at 100.0% (253 of 253 strings) Co-authored-by: Léane GRASSER <leane.grasser@proton.me> Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/ Translation: systemd/main
2024-09-06measure: introduce support for a new ".profile" sectionLennart Poettering3-6/+14
This introduces the concept, and makes sure systemd-measure covers it. See a later commit for details on the new section.
2024-09-06uki: add new ".profile" PE section typeLennart Poettering3-1/+3
This is the most basic preparatory work for supporting multi-profile UKIs. (This temporarily drops an assert_cc() check which we'll address in the next commit)