]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agoportable: always reopen fd of release file 27201/head
Yu Watanabe [Sat, 8 Apr 2023 20:55:17 +0000 (05:55 +0900)] 
portable: always reopen fd of release file

To make it support the case that the fd is O_PATH.

2 years agocopy: make copy_bytes() support O_PATH fds
Yu Watanabe [Sat, 8 Apr 2023 08:33:25 +0000 (17:33 +0900)] 
copy: make copy_bytes() support O_PATH fds

2 years agoMerge pull request #27182 from mrc0mmand/test-tweaks
Luca Boccassi [Mon, 10 Apr 2023 17:42:34 +0000 (18:42 +0100)] 
Merge pull request #27182 from mrc0mmand/test-tweaks

test: a couple of stability tweaks

2 years agoMerge pull request #27184 from yuwata/xfopenat-full
Daan De Meyer [Mon, 10 Apr 2023 09:50:34 +0000 (11:50 +0200)] 
Merge pull request #27184 from yuwata/xfopenat-full

fileio: introduce xfopenat_full()

2 years agoci: add permissions to make a release
Дамјан Георгиевски [Mon, 3 Apr 2023 09:10:41 +0000 (11:10 +0200)] 
ci: add permissions to make a release

follow-up to https://github.com/systemd/systemd/pull/27071
in order to create Github Releases, the job needs permissions to write
contents

also:
- pinned the `softprops/action-gh-release` action to a specific commit
- made it only active on the `systemd` organization repos (so not on
  forks)

2 years agoMerge pull request #27193 from yuwata/analyze-blame
Mike Yuan [Mon, 10 Apr 2023 09:19:11 +0000 (17:19 +0800)] 
Merge pull request #27193 from yuwata/analyze-blame

analyze: make 'blame' work even the default target not reached

2 years agoMerge pull request #27194 from yuwata/chase-cleanups
Daan De Meyer [Mon, 10 Apr 2023 05:52:04 +0000 (07:52 +0200)] 
Merge pull request #27194 from yuwata/chase-cleanups

chase: several cleanups

2 years agofd-util: slightly optimize dir_fd_is_root() 27194/head
Yu Watanabe [Mon, 10 Apr 2023 01:04:25 +0000 (10:04 +0900)] 
fd-util: slightly optimize dir_fd_is_root()

When STATX_MNT_ID is not supported, we need to manually obtain mount id.
Let's compare inodes earlier.

2 years agochase: use dir_fd_is_root() to check if fd points to the root directory
Yu Watanabe [Mon, 10 Apr 2023 00:55:22 +0000 (09:55 +0900)] 
chase: use dir_fd_is_root() to check if fd points to the root directory

As commented in dir_fd_is_root(), comparing inode is not enough to
determine if we are at the root directory.

2 years agochase: use stat_inode_same() at one more place
Yu Watanabe [Mon, 10 Apr 2023 00:45:21 +0000 (09:45 +0900)] 
chase: use stat_inode_same() at one more place

2 years agotest: add tests about iterator position for path_find_{first,last}_component()
Yu Watanabe [Mon, 10 Apr 2023 00:31:28 +0000 (09:31 +0900)] 
test: add tests about iterator position for path_find_{first,last}_component()

When path_find_first_component() returns the last component, the iterator
must be an empty string. The fact is heavily used in chaseat(). Let's
explicitly test it.

2 years agopath-util: make iterator for path_find_last_component() always finish with the beginn...
Yu Watanabe [Mon, 10 Apr 2023 00:30:14 +0000 (09:30 +0900)] 
path-util: make iterator for path_find_last_component() always finish with the beginning of the buffer

2 years agochase: extend comment about CHASE_PARENT
Yu Watanabe [Sun, 9 Apr 2023 23:57:01 +0000 (08:57 +0900)] 
chase: extend comment about CHASE_PARENT

2 years agochase: drop one redundant call of fstat()
Yu Watanabe [Sun, 9 Apr 2023 23:43:28 +0000 (08:43 +0900)] 
chase: drop one redundant call of fstat()

Now, 'st' is always synced with 'fd'. Hence, we can use
stat_verify_directory().

2 years agochase: make struct stat always sync with the opened fd
Yu Watanabe [Sun, 9 Apr 2023 23:40:08 +0000 (08:40 +0900)] 
chase: make struct stat always sync with the opened fd

Previously, struct stat may not be correctly synced with the currently
opened fd, e.g. when a path contains symlink which points to an absolute
path.

This also rename variables for struct stat, to make them consistent with
the corresponding fd.

2 years agochase: drop unnecessary conditions for buffer
Yu Watanabe [Sun, 9 Apr 2023 23:17:07 +0000 (08:17 +0900)] 
chase: drop unnecessary conditions for buffer

2 years agotest: add another regression test 27193/head
Yu Watanabe [Sun, 9 Apr 2023 18:07:22 +0000 (03:07 +0900)] 
test: add another regression test

For #27187, which should be also caused by #26956.

2 years agotest: systemd-analyze blame should succeed now
Yu Watanabe [Sun, 9 Apr 2023 18:40:49 +0000 (03:40 +0900)] 
test: systemd-analyze blame should succeed now

2 years agoanalyze: make blame command work even the default target not reached
Yu Watanabe [Sun, 9 Apr 2023 18:37:51 +0000 (03:37 +0900)] 
analyze: make blame command work even the default target not reached

2 years agokernel-image: make inspect_kernel() optionally take directory fd
Yu Watanabe [Sat, 8 Apr 2023 19:12:53 +0000 (04:12 +0900)] 
kernel-image: make inspect_kernel() optionally take directory fd

2 years agofileio: introduce read_one_line_file_at()
Yu Watanabe [Sat, 8 Apr 2023 17:41:26 +0000 (02:41 +0900)] 
fileio: introduce read_one_line_file_at()

2 years agofileio: introduce xfopenat_full() 27184/head
Yu Watanabe [Fri, 7 Apr 2023 03:24:01 +0000 (12:24 +0900)] 
fileio: introduce xfopenat_full()

This unifies call of various xfopenat() variants.
No functional change, just refactoring.

2 years agofileio: use take_fdopen() and friends
Yu Watanabe [Fri, 7 Apr 2023 02:39:20 +0000 (11:39 +0900)] 
fileio: use take_fdopen() and friends

2 years agoMerge pull request #27160 from yuwata/conf_files_list_at
Yu Watanabe [Sat, 8 Apr 2023 05:25:20 +0000 (14:25 +0900)] 
Merge pull request #27160 from yuwata/conf_files_list_at

conf-files: introduce _at() variants of conf file enumerator

2 years agoMerge pull request #27174 from YHNdnzj/edit-util-fixlets
Yu Watanabe [Sat, 8 Apr 2023 04:56:06 +0000 (13:56 +0900)] 
Merge pull request #27174 from YHNdnzj/edit-util-fixlets

edit-util: several improvements

2 years agotest: check if we skip the full setup on daemon-reexec (again)
Frantisek Sumsal [Fri, 7 Apr 2023 11:58:49 +0000 (13:58 +0200)] 
test: check if we skip the full setup on daemon-reexec (again)

My original assumption in 61961e693d was wrong, since we do reset
/dev/console during reexec (see make_console_stdio()), so the test was
quite racy. Let's replace it with something, hopefully, more reliable.

Follow-up to 61961e693d.

2 years agotest: add tests for conf_files_list_at() and friends 27160/head
Yu Watanabe [Fri, 7 Apr 2023 21:01:10 +0000 (06:01 +0900)] 
test: add tests for conf_files_list_at() and friends

2 years agoconf-files: introduce _at() variants of conf_files_list() or friends
Yu Watanabe [Thu, 6 Apr 2023 21:09:15 +0000 (06:09 +0900)] 
conf-files: introduce _at() variants of conf_files_list() or friends

2 years agoconf-files: split out logic of copy and sort filenames from hashmap
Yu Watanabe [Fri, 7 Apr 2023 20:02:56 +0000 (05:02 +0900)] 
conf-files: split out logic of copy and sort filenames from hashmap

No functional change, preparation for the next commit.

2 years agoconf-files: use path_compare_filename()
Yu Watanabe [Thu, 6 Apr 2023 20:42:18 +0000 (05:42 +0900)] 
conf-files: use path_compare_filename()

2 years agopath-util: introduce path_compare_filename()
Yu Watanabe [Thu, 6 Apr 2023 20:39:44 +0000 (05:39 +0900)] 
path-util: introduce path_compare_filename()

2 years agoconf-files: drop redundant call of chase()
Yu Watanabe [Thu, 6 Apr 2023 04:44:46 +0000 (13:44 +0900)] 
conf-files: drop redundant call of chase()

Previously, chase() was called twice in files_add() and path_strv_resolve_uniq().

2 years agotest: handle one more error gracefully
Yu Watanabe [Fri, 7 Apr 2023 01:09:01 +0000 (10:09 +0900)] 
test: handle one more error gracefully

Fixes #27175.

2 years agolocaled: fix invalid free after shifting pointers using strstrip
Olivier Gayot [Fri, 7 Apr 2023 08:32:07 +0000 (10:32 +0200)] 
localed: fix invalid free after shifting pointers using strstrip

After manually editing /etc/locale.gen, calling localectl set-locale
sometimes fails. When it fails, the systemd journal shows:
systemd-localed: free() / invalid pointer.

It turned out that it only fails if some of the uncommented lines in
/etc/locale.gen have leading spaces, as in:

  * C.UTF-8       <= OK
  * en_US.UTF-8   <= OK
  *  fr_FR.UTF-8  <= NOK

After parsing a line from /etc/locale.gen, we use strstrip() to obtain
the "trimmed" line (without leading or trailing spaces).

However, we store the result of strstrip() in the original pointer
containing the untrimmed line. This pointer is later passed to free
(this is done automatically using _cleanup_free_).

This is a problem because if any leading space is present, the pointer
will essentially be shifted from its original value. This will result in
an invalid free upon cleanup.

The same issue is present in the locale_gen_locale_supported function.

Fixed by storing the result of strstrip() in a different pointer.

2 years agotest: bump the timeout for non-qemu runs to 90s 27182/head
Frantisek Sumsal [Fri, 7 Apr 2023 15:23:59 +0000 (17:23 +0200)] 
test: bump the timeout for non-qemu runs to 90s

When Ubuntu CI is oversaturated, 60s doesn't seem to be enough.

2 years agotest: enable the systemd-resolved unit in TEST-75
Frantisek Sumsal [Fri, 7 Apr 2023 15:00:10 +0000 (17:00 +0200)] 
test: enable the systemd-resolved unit in TEST-75

Without enabling itx, there's no symlink to the org.freedesktop.resolve1
dbus service, so there exists a tiny window in which the sequence of
`systemctl start` and `systemctl service-log-level` commands might fail:

[ 1127.615151] H systemd[1]: Started Network Name Resolution.
[ 1127.617768] H testsuite-75.sh[34]: + systemctl service-log-level systemd-resolved.service debug
[ 1127.621251] H dbus-daemon[54]: [system] Activating via systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service' requested by ':1.24' (uid=0 pid=119 comm="systemctl service-log-level systemd-resolved>
[ 1127.621336] H systemd[1]: dbus-org.freedesktop.resolve1.service: Failed to load configuration: No such file or directory
[ 1127.621364] H systemd[1]: dbus-org.freedesktop.resolve1.service: Trying to enqueue job dbus-org.freedesktop.resolve1.service/start/replace
[ 1127.621395] H systemd[1]: D-Bus activation failed for dbus-org.freedesktop.resolve1.service: Unit dbus-org.freedesktop.resolve1.service not found.
[ 1127.621965] H dbus-daemon[54]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
[ 1127.622046] H systemd[1]: systemd-resolved.service: D-Bus name org.freedesktop.resolve1 now owned by :1.25
[ 1127.622130] H systemctl[119]: Failed to set log level of org.freedesktop.resolve1 to debug: Unit dbus-org.freedesktop.resolve1.service not found.

Spotted in a couple of recent Ubuntu CI runs.

2 years agoman/systemd-mount: Clearify documentation about --bind-device
Uwe Kleine-König [Wed, 5 Apr 2023 16:23:40 +0000 (18:23 +0200)] 
man/systemd-mount: Clearify documentation about --bind-device

The documentation suggests that the mount point (i.e. the directory
where the device is mounted) is removed when the device vanishes.
However only stopping of the automount unit is implemented.

So adapt the documentation to reality.

2 years agomkosi: Update to latest
Daan De Meyer [Fri, 7 Apr 2023 11:50:06 +0000 (13:50 +0200)] 
mkosi: Update to latest

This contains the recently merged fixes to config parsing ordering
and overrides.

2 years agohwdb: Add support for "Passion Model P612F"
Dmitrii Fomchenkov [Fri, 7 Apr 2023 06:44:36 +0000 (09:44 +0300)] 
hwdb: Add support for "Passion Model P612F"

Add hwdb sensor entry for device Passion with accelerometer "MXC6655".

2 years agoMerge pull request #26887 from yuwata/proc-cmdline-filter-arguments
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2023 08:55:30 +0000 (10:55 +0200)] 
Merge pull request #26887 from yuwata/proc-cmdline-filter-arguments

proc-cmdline: filter PID1 arguments on container

2 years agoMerge pull request #27161 from pothos/sysext-refresh
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2023 08:40:18 +0000 (10:40 +0200)] 
Merge pull request #27161 from pothos/sysext-refresh

systemd-sysext/confext.service: Refresh on start/reload

2 years agobootctl: Gracefully handle missing bootloader directory
Daan De Meyer [Thu, 6 Apr 2023 10:17:18 +0000 (12:17 +0200)] 
bootctl: Gracefully handle missing bootloader directory

When --graceful is specified, let's gracefully deal with a missing
bootloader directory.

2 years agobootctl: show report state and type in json output
Ludwig Nussel [Thu, 6 Apr 2023 09:45:23 +0000 (11:45 +0200)] 
bootctl: show report state and type in json output

2 years agoedit-util: improve log messages 27174/head
Mike Yuan [Thu, 6 Apr 2023 19:55:39 +0000 (03:55 +0800)] 
edit-util: improve log messages

2 years agoedit-util: introduce overwrite_with_origin switch
Mike Yuan [Thu, 6 Apr 2023 17:41:24 +0000 (01:41 +0800)] 
edit-util: introduce overwrite_with_origin switch

Before this commit, if `original_path` is given,
it will always be used to overwrite `path`.
After this commit, it's controlled by the newly-added
switch `overwrite_with_origin`.

2 years agoedit-util: make original_path and comment_paths work together
Mike Yuan [Thu, 6 Apr 2023 17:41:24 +0000 (01:41 +0800)] 
edit-util: make original_path and comment_paths work together

2 years agoedit-util: add DROPIN_MARKER_{START,END}
Mike Yuan [Wed, 5 Apr 2023 08:48:27 +0000 (16:48 +0800)] 
edit-util: add DROPIN_MARKER_{START,END}

2 years agoresolve: change DNS_PACKET_UNICAST_SIZE_LARGE_MAX to 1232 (#27171)
Cristian Rodríguez [Fri, 7 Apr 2023 07:52:52 +0000 (03:52 -0400)] 
resolve: change DNS_PACKET_UNICAST_SIZE_LARGE_MAX to 1232 (#27171)

The old common default was 4096, until 2020 on which all DNS servers (verified
on BIND9, NSD, Unbound, dnsmasq) switched to 1232 as an agreed max size [1].

[1] https://www.dnsflagday.net/2020/#message-size-considerations

2 years agoMerge pull request #27126 from yuwata/journal-compress
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2023 07:28:27 +0000 (09:28 +0200)] 
Merge pull request #27126 from yuwata/journal-compress

sd-journal: allow to specify compression algorithm through env

2 years agoman: netdev: Clarify wireguard IPv6 endpoint format
Sorah Fukumori [Thu, 6 Apr 2023 19:15:43 +0000 (04:15 +0900)] 
man: netdev: Clarify wireguard IPv6 endpoint format

2 years agomkosi: Update to latest
Daan De Meyer [Thu, 6 Apr 2023 19:41:14 +0000 (21:41 +0200)] 
mkosi: Update to latest

This also migrates the configuration to the new format that was
just merged in mkosi. Specifically, we make use of the new [Match]
sections to only include specific config snippets per distro.

2 years agoMerge pull request #27158 from mrc0mmand/more-tests
Yu Watanabe [Thu, 6 Apr 2023 22:53:37 +0000 (07:53 +0900)] 
Merge pull request #27158 from mrc0mmand/more-tests

test: introduce TEST-81-GENERATORS

2 years agotest: check if we skip the full setup on daemon-reexec
Frantisek Sumsal [Thu, 6 Apr 2023 17:14:12 +0000 (19:14 +0200)] 
test: check if we skip the full setup on daemon-reexec

A simple test case for issue #27106.

Resolves: #27139

2 years agotest: add test case that journal file is created with the requested compression algorithm 27126/head
Yu Watanabe [Tue, 4 Apr 2023 06:03:35 +0000 (15:03 +0900)] 
test: add test case that journal file is created with the requested compression algorithm

2 years agosystemd-sysext/confext.service: Refresh on start/reload 27161/head
Kai Lueke [Thu, 6 Apr 2023 08:32:33 +0000 (17:32 +0900)] 
systemd-sysext/confext.service: Refresh on start/reload

When adding a sysext image to the system and manuall merging it, a
later "systemctl (re)start systemd-sysext" won't work because "merge"
refuses to work when something is merged already. Another problem with
"merge" at start plus "unmerge" at stop is that a service restart can't
make use of the new MOVE_MOUNT_BENEATH in the future even which would
only be available in "refresh". It also prepares us for setting up the
merged overlay for the sysroot from the initrd already, which also
would lead to the mentioned start problem of the service (One
optimization could be to skip the loading but only if we are sure that
all images were loaded and weren't modified since - this assumption is
hard because early services could want to inject a sysext, too).

Use "refresh" on service start to fix the problem that the service
can't start as soon as a manual merge was done. Also add a reload
action that allows to issue "systemctl reload systemd-sysext" and it
will make use of MOVE_MOUNT_BENEATH once we implement this in
systemd-sysext refresh (and it's available from the kernel).

2 years agoman/systemd-dissect.xml: Remove old sysext path, add confext path
Kai Lueke [Thu, 6 Apr 2023 08:30:34 +0000 (17:30 +0900)] 
man/systemd-dissect.xml: Remove old sysext path, add confext path

The /usr/lib/extensions/ location for systemd-sysext images is not
supported anymore. In https://github.com/systemd/systemd/pull/26013
systemd-confext images got introduced and we can list its path under
/usr instead.

2 years agotest: introduce TEST-81-GENERATORS 27158/head
Frantisek Sumsal [Mon, 3 Apr 2023 20:38:37 +0000 (22:38 +0200)] 
test: introduce TEST-81-GENERATORS

Add some explicit tests for various generators we ship, e.g.:
    - systemd-debug-generator
    - systemd-environment-d-generator
    - systemd-fstab-generator

2 years agoMerge pull request #26013 from goenkam/maanya/syscfg-feature
Luca Boccassi [Thu, 6 Apr 2023 09:59:18 +0000 (10:59 +0100)] 
Merge pull request #26013 from goenkam/maanya/syscfg-feature

confext: extension of sysext

2 years agotest: add a couple of tests for systemd-modules-load
Frantisek Sumsal [Mon, 3 Apr 2023 16:32:58 +0000 (18:32 +0200)] 
test: add a couple of tests for systemd-modules-load

2 years agofstab-generator: don't propagate ignored errno
Frantisek Sumsal [Wed, 5 Apr 2023 18:14:53 +0000 (20:14 +0200)] 
fstab-generator: don't propagate ignored errno

With certain fstabs we may propagate ENXIO from the $SYSTEMD_SYSFS_CHECK
check all the way up, making fstab-generator exit with a non-zero EC and
without any helpful message, which is really confusing.

2 years agorepart: Add more logging
Daan De Meyer [Wed, 5 Apr 2023 17:36:05 +0000 (19:36 +0200)] 
repart: Add more logging

2 years agoconfext: shell completion for systemd-confext 26013/head
maanyagoenka [Fri, 24 Feb 2023 08:44:36 +0000 (08:44 +0000)] 
confext: shell completion for systemd-confext

2 years agoconfext: documentation and man page updates for confext
maanyagoenka [Fri, 24 Feb 2023 08:42:45 +0000 (08:42 +0000)] 
confext: documentation and man page updates for confext

2 years agotest-os-util: add tests for sysext and confext release files
maanyagoenka [Fri, 31 Mar 2023 17:33:00 +0000 (17:33 +0000)] 
test-os-util: add tests for sysext and confext release files

2 years agoconfext: add tests for systemd-confext
maanyagoenka [Fri, 24 Feb 2023 08:35:38 +0000 (08:35 +0000)] 
confext: add tests for systemd-confext

2 years agoconfext: add the systemd-confext.service file
maanyagoenka [Fri, 24 Feb 2023 08:33:15 +0000 (08:33 +0000)] 
confext: add the systemd-confext.service file

2 years agoconfext: add multi call functionality to sysext
maanyagoenka [Wed, 29 Mar 2023 20:35:18 +0000 (20:35 +0000)] 
confext: add multi call functionality to sysext

The confext concept is an extension of the existing sysext concept and
allows to extend the host's filesystem or a unit's filesystem with signed
images that add new files to the /etc/ directory using OverlayFS.

2 years agoextension-release: establish compatibility between host file and extension-release...
maanyagoenka [Wed, 29 Mar 2023 20:34:21 +0000 (20:34 +0000)] 
extension-release: establish compatibility between host file and extension-release file

The release file that accompanies the confext images needs to be
host compatible to be able to be merged into the host /etc/ directory.
This commit checks for version compatibility between the image file and
the host file.

2 years agoos-util: add a new confext image type and the ability to parse their release files
maanyagoenka [Fri, 24 Feb 2023 00:37:52 +0000 (00:37 +0000)] 
os-util: add a new confext image type and the ability to parse their release files

Adds a new image type called IMAGE_CONFEXT which is similar to IMAGE_SYSEXT but works
for the /etc/ directory instead of /usr/ and /opt/. This commit also adds the ability to
parse the release file that is present with the confext image in /etc/confext-release.d/
directory.

2 years agoMerge pull request #27154 from DaanDeMeyer/kconfig
Luca Boccassi [Wed, 5 Apr 2023 18:59:24 +0000 (19:59 +0100)] 
Merge pull request #27154 from DaanDeMeyer/kconfig

mkosi kernel build updates

2 years agotest: use kbd-mode-map we ship in TEST-73-LOCALE
Franck Bui [Wed, 5 Apr 2023 11:37:48 +0000 (13:37 +0200)] 
test: use kbd-mode-map we ship in TEST-73-LOCALE

The rational is the same as the one described in commit
be0cc2ce6c947aafadb3f42dba405269f670b31c.

2 years agotest: add tests for dir_fd_is_root_or_cwd()
Yu Watanabe [Wed, 5 Apr 2023 06:23:19 +0000 (15:23 +0900)] 
test: add tests for dir_fd_is_root_or_cwd()

Follow-up for e212f422796da9e626030289faf083407c8955df.

2 years agomkosi: Update bundled kconfig 27154/head
Daan De Meyer [Wed, 5 Apr 2023 15:04:30 +0000 (17:04 +0200)] 
mkosi: Update bundled kconfig

- Remove useless serial console configs
- Add CONFIG_SERIAL_8250_PCI so that qemu's virtconsole works properly
- Add CONFIG_DMI and CONFIG_DMI_SYSFS so that SMBIOS credentials work
- Add CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC so we can read the
  current kernel config from /proc/config.gz
- Add CONFIG_IOSCHED_BFQ to get rid of a udev error on boot on Fedora
- Add CONFIG_HW_RANDOM_VIRTIO to get hw rng in qemu
- Add CONFIG_SECURITY_YAMA to get rid of warning from sysctl on boot
- Add CONFIG_VSOCKETS and CONFIG_VIRTIO_VSOCKETS to enable vsock support

2 years agomkosi: Make sure we always boot our built from source kernel
Daan De Meyer [Wed, 5 Apr 2023 14:20:28 +0000 (16:20 +0200)] 
mkosi: Make sure we always boot our built from source kernel

If we build a kernel from source, let's make sure it's always booted
by giving it a very high version number.

2 years agoresolve: refuse mdns scope for ipv4 broadcast addresses
Ronan Pigott [Mon, 27 Mar 2023 16:43:58 +0000 (09:43 -0700)] 
resolve: refuse mdns scope for ipv4 broadcast addresses

This query can never be answered, so let's no wait for it to timeout.

2 years agoMerge pull request #27143 from bluca/no_tpm
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2023 09:24:18 +0000 (11:24 +0200)] 
Merge pull request #27143 from bluca/no_tpm

cryptsetup: fix build without TPM2

2 years agoRevert "mkosi: Drop python-docutils"
Daan De Meyer [Wed, 5 Apr 2023 08:23:58 +0000 (10:23 +0200)] 
Revert "mkosi: Drop python-docutils"

This reverts commit be266f49d6b7e3f021e2a07f937d39d1f14a283d.

Turns out we installed this because it's required by the bpf selftests
so let's keep it intact.

2 years agoservice: use newdup() where appropriate
Lennart Poettering [Tue, 4 Apr 2023 14:25:33 +0000 (16:25 +0200)] 
service: use newdup() where appropriate

2 years agoMerge pull request #27137 from yuwata/id128-get-machine
Yu Watanabe [Wed, 5 Apr 2023 06:24:45 +0000 (15:24 +0900)] 
Merge pull request #27137 from yuwata/id128-get-machine

sd-id128: introduce id128_get_machine() and _at()

2 years agovarious: simplify calls to parse_boolean_argument()
Zbigniew Jędrzejewski-Szmek [Tue, 4 Apr 2023 17:39:04 +0000 (19:39 +0200)] 
various: simplify calls to parse_boolean_argument()

parse_boolean_argument() returns the same information via both the output
argument and normal return.

2 years agoci: do one build with no tpm/p11kit/fido2 27143/head
Luca Boccassi [Tue, 4 Apr 2023 21:37:35 +0000 (22:37 +0100)] 
ci: do one build with no tpm/p11kit/fido2

We have some missing coverage in the CI, all builds enable these features,
but there are often changes and they cover a lot of code. Do one build
without them to ensure we don't break builds.

2 years agocryptsetup: fix build without TPM2
Luca Boccassi [Tue, 4 Apr 2023 21:34:49 +0000 (22:34 +0100)] 
cryptsetup: fix build without TPM2

Follow-up for acbb504eaf1be51572b1c0d0d490ac478bc41c64

2 years agotpm2: fix nits from PR #26185
William Roberts [Tue, 4 Apr 2023 16:14:17 +0000 (11:14 -0500)] 
tpm2: fix nits from PR #26185

Fixes:
  - Comment style
  - Alignment style
  - cleanup macro usage
  - incorrect error message[1]

1. Thanks to tempusfugit991@gmail.com for pointing out the error
message mistake.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
2 years agotest/test-functions: fix typo in install_suse_systemd()
Thomas Blume [Tue, 4 Apr 2023 13:13:13 +0000 (15:13 +0200)] 
test/test-functions: fix typo in install_suse_systemd()

2 years agoupdate TODO
Lennart Poettering [Tue, 4 Apr 2023 19:28:50 +0000 (21:28 +0200)] 
update TODO

As it turns out RuntimeDirectoryPreserve= already supports such a mode.

2 years agoupdate TODO
Lennart Poettering [Tue, 4 Apr 2023 19:27:52 +0000 (21:27 +0200)] 
update TODO

2 years agoexecute: add one more assert()
Lennart Poettering [Tue, 4 Apr 2023 11:41:00 +0000 (13:41 +0200)] 
execute: add one more assert()

2 years agoMerge pull request #27128 from keszybz/sd-bus-docs-and-error-messages
Zbigniew Jędrzejewski-Szmek [Tue, 4 Apr 2023 19:28:15 +0000 (21:28 +0200)] 
Merge pull request #27128 from keszybz/sd-bus-docs-and-error-messages

Improvements to man pages for systemd.service, sd-bus, and better error messages

2 years agoman: mention -o option for systemd-journal-remote
Yu Watanabe [Tue, 4 Apr 2023 15:38:55 +0000 (00:38 +0900)] 
man: mention -o option for systemd-journal-remote

2 years agomachine-id-setup: do not read host's machine ID when root directory is specified 27137/head
Yu Watanabe [Fri, 31 Mar 2023 07:07:23 +0000 (16:07 +0900)] 
machine-id-setup: do not read host's machine ID when root directory is specified

If a root directory is specified, and e.g. /var under the root directory
is a symlink to the host's /var, then we wrongly read host's machine ID,
even if O_NOFOLLOW is set.

Let's chase the path with CHASE_NOFOLLOW to refuse such case.

Also, refuse null ID, otherwise we may setup machine ID with NULL.

2 years agomachine-id-setup: use id128_get_machine() at one more place
Yu Watanabe [Sat, 1 Apr 2023 13:49:47 +0000 (22:49 +0900)] 
machine-id-setup: use id128_get_machine() at one more place

2 years agodiscover-image: use id128_get_machine() at one more place
Yu Watanabe [Sat, 1 Apr 2023 13:49:22 +0000 (22:49 +0900)] 
discover-image: use id128_get_machine() at one more place

2 years agospecifier: always convert missing machine-id file to EUNATCH
Yu Watanabe [Sat, 1 Apr 2023 13:48:14 +0000 (22:48 +0900)] 
specifier: always convert missing machine-id file to EUNATCH

Then, use id128_get_machine().

2 years agonspawn: ignore NULL machine ID in the container
Yu Watanabe [Sat, 1 Apr 2023 05:59:46 +0000 (14:59 +0900)] 
nspawn: ignore NULL machine ID in the container

Previously, when the NULL (all zero) machine ID is configured in the
container, nspawn refused to execute.

Now id128_get_machine() is used, so NULL machine ID is refused with
-ENOMEDIUM, and fallback to specified UUID or randomly generated one.

2 years agorepart: use id128_get_machine()
Yu Watanabe [Fri, 31 Mar 2023 07:00:37 +0000 (16:00 +0900)] 
repart: use id128_get_machine()

This also makes that the seed is actually randomized when the read
machine ID is NULL.

2 years agotest: add tests for id128_get_machine() and _at()
Yu Watanabe [Tue, 4 Apr 2023 02:43:06 +0000 (11:43 +0900)] 
test: add tests for id128_get_machine() and _at()

2 years agosd-id128: introduce id128_get_machine() and id128_get_machine_at()
Yu Watanabe [Fri, 31 Mar 2023 06:55:01 +0000 (15:55 +0900)] 
sd-id128: introduce id128_get_machine() and id128_get_machine_at()

2 years agofd-util: introduce dir_fd_is_root_or_cwd()
Yu Watanabe [Sat, 1 Apr 2023 16:25:46 +0000 (01:25 +0900)] 
fd-util: introduce dir_fd_is_root_or_cwd()

2 years agotest: add tests for ID128_REFUSE_NULL
Yu Watanabe [Tue, 4 Apr 2023 03:26:57 +0000 (12:26 +0900)] 
test: add tests for ID128_REFUSE_NULL

2 years agosd-id128: introduce ID128_REFUSE_NULL flag
Yu Watanabe [Tue, 4 Apr 2023 03:18:04 +0000 (12:18 +0900)] 
sd-id128: introduce ID128_REFUSE_NULL flag