Yu Watanabe [Tue, 5 Apr 2022 12:47:46 +0000 (21:47 +0900)]
core: command argument can be longer than PATH_MAX
Fixes a bug introduced by
065364920281e1cf59cab989e17aff21790505c4.
Fixes #22957.
Lennart Poettering [Tue, 5 Apr 2022 12:36:00 +0000 (14:36 +0200)]
update TODO
Lennart Poettering [Tue, 5 Apr 2022 12:02:36 +0000 (14:02 +0200)]
fix TODO
Lennart Poettering [Tue, 5 Apr 2022 11:59:39 +0000 (13:59 +0200)]
update TODO
Luca Boccassi [Tue, 5 Apr 2022 10:10:20 +0000 (11:10 +0100)]
Merge pull request #22953 from yuwata/test-sd-device
test: several fixlets for test-sd-device
Lennart Poettering [Tue, 5 Apr 2022 08:44:52 +0000 (10:44 +0200)]
update TODO
Lennart Poettering [Tue, 5 Apr 2022 08:16:45 +0000 (10:16 +0200)]
update TODO
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 06:59:44 +0000 (08:59 +0200)]
Merge pull request #22956 from yuwata/network-fix-permission-error
network: ignore all errors in loading .network files
Yu Watanabe [Tue, 5 Apr 2022 05:28:20 +0000 (14:28 +0900)]
test-sd-device: ignore several errors when running on non-host network namespace
Fixes https://github.com/systemd/systemd/commit/
93e04eb43bed6cd1cea344f8fb1002b62155fae2#commitcomment-
70387367.
Yu Watanabe [Mon, 4 Apr 2022 09:39:38 +0000 (18:39 +0900)]
test-sd-device: allow several devices removed during running test
To make the test stabler.
Yu Watanabe [Mon, 4 Apr 2022 09:25:49 +0000 (18:25 +0900)]
test-sd-device: device ID requires subsystem
Yu Watanabe [Mon, 4 Apr 2022 09:42:29 +0000 (18:42 +0900)]
test-sd-device: log earlier which device is handled
To make debugging the test easier.
Yu Watanabe [Tue, 5 Apr 2022 04:42:43 +0000 (13:42 +0900)]
Merge pull request #22951 from keszybz/fix-entry-selection-bootctl-status
Fix entry selection in bootctl status
Yu Watanabe [Tue, 5 Apr 2022 04:13:06 +0000 (13:13 +0900)]
Merge pull request #22964 from yuwata/udevadm-lock-follow-ups
udevadm lock follow ups
Yu Watanabe [Mon, 4 Apr 2022 18:31:58 +0000 (03:31 +0900)]
test: use udevadm wait and lock
Hopefully fixes #22911.
Yu Watanabe [Mon, 4 Apr 2022 18:17:48 +0000 (03:17 +0900)]
shell-completion: update for udevadm
Yu Watanabe [Mon, 4 Apr 2022 18:56:10 +0000 (03:56 +0900)]
fix typo
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2022 08:45:47 +0000 (10:45 +0200)]
man: add annotated example for bootctl status & list
This is based on the output on my laptop, with various manual adjustments.
If people have other types of entries, it'd be useful to add them here. In
particular, some dual-boot entries would be nice.
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2022 08:13:16 +0000 (10:13 +0200)]
man: fix tag syntax
Strangely enough, having <varlistenetry>s outside of <variablelist> wasn't
causing visual problems. But having two <listitem>s in one <varlistentry>
resulted in the paragraphs running together in the rendered man page.
Zbigniew Jędrzejewski-Szmek [Fri, 1 Apr 2022 10:08:17 +0000 (12:08 +0200)]
bootctl: unify boot entry loading for "status" and "list"
We must be consistent in the two listings, so let's split out the loading code
and call it from both verb_status() and verb_list(). This effectively makes
verb_status() also call efi_loader_get_entries().
There is still some code duplicated, but that's hard to avoid. Error messages
are made identical for the same errors in various places.
Fixes #22580.
Yu Watanabe [Mon, 4 Apr 2022 18:57:24 +0000 (03:57 +0900)]
Merge pull request #22963 from poettering/udevadm-diskseq-fix
sd-device diskseq fix + udevadm info improvements
Yu Watanabe [Mon, 4 Apr 2022 18:04:23 +0000 (03:04 +0900)]
Merge pull request #22867 from poettering/lockdev-util
add small "udevadm lock" tool for locking a block device
Luca Boccassi [Mon, 4 Apr 2022 17:39:59 +0000 (18:39 +0100)]
Merge pull request #22960 from mrc0mmand/use-udevadm-wait
test: use the new `udevadm wait` verb to wait for the loop device
Lennart Poettering [Mon, 4 Apr 2022 10:46:03 +0000 (12:46 +0200)]
tree-wide: use 'Architecture' type consistently across the tree
Some parts of our tree used 'Architecture' for storing architectures,
others used ints. Let's unify on the former.
Inspired by #22952's rework of the 'Virtualization' enum.
Yu Watanabe [Mon, 4 Apr 2022 17:03:22 +0000 (02:03 +0900)]
udev/net: always log error in link_load_one()
Yu Watanabe [Mon, 4 Apr 2022 16:58:37 +0000 (01:58 +0900)]
network: always log error in network_load_one() and netdev_load_one()
Yu Watanabe [Mon, 4 Apr 2022 16:57:03 +0000 (01:57 +0900)]
network: ignore all errors in loading .network files
This partially reverts
9202b567bcdd0c1f6a1fc2a5f36602e619960813.
Fixes #22954.
Lennart Poettering [Mon, 4 Apr 2022 13:35:01 +0000 (15:35 +0200)]
man: document various sd_device_get_xyz() functions
Lennart Poettering [Mon, 4 Apr 2022 14:01:25 +0000 (16:01 +0200)]
udevadm: if invalid devices are specified on "info" verb, continue
If multiple devices are specified on "udevadm info", then show data
about them all even if one is missing. Return first encountered error
though.
Lennart Poettering [Mon, 4 Apr 2022 14:00:25 +0000 (16:00 +0200)]
udevadm: add a dash of color to "udevadm info"
Let's make it easier to discern the "header" of device records from the
"body", i.e. non-property data from property data, by using some
conservative coloring.
Lennart Poettering [Mon, 4 Apr 2022 13:25:01 +0000 (15:25 +0200)]
udevadm: show more fields of sd_device objects in "udevadm info"
Let's make things easier to debug, and show a more comprehensive set of
fields, extending on the existing output syntax that starts with one
marker character followed by a colon and a space.
Lennart Poettering [Mon, 4 Apr 2022 13:18:57 +0000 (15:18 +0200)]
sd-device: actually read diskseq if told so
sd_device_get_diskseq() actually called device_read_uevent_file() but
that function didn't actually parse DISKSEQ= so far. Fix that.
Lennart Poettering [Mon, 4 Apr 2022 13:20:01 +0000 (15:20 +0200)]
sd-device: rename return parameter of sd_device_get_devpath() to ret
Lennart Poettering [Mon, 4 Apr 2022 13:38:33 +0000 (15:38 +0200)]
man: properly conditionalize kernel-install man page
Change
f887eab1da85d0053321d43228042d90720eb77e conditionalized the
building of ther kenel-install man page in the generated meson output,
instead of the source in the XML markup. Thus, whenever the rules file
is updated the conditionalization is lost. Correct that.
Follow-up for:
f887eab1da85d0053321d43228042d90720eb77e
Franck Bui [Fri, 18 Mar 2022 07:12:48 +0000 (08:12 +0100)]
journald: make use of CLAMP() in cache_space_refresh()
Franck Bui [Fri, 18 Mar 2022 07:12:06 +0000 (08:12 +0100)]
journald: make sure journal_file_open() doesn't leave a corrupted file around after failing
This can be problematic especially when there's no more free disk
space. Consider the following:.
When disk space becomes sparse, writting to the system journal can lead to
error. In this case journald attempts to make room by rotating the journals,
which consists in archiving online journals and opening new ones.
However opening new files is likely to fail too and in this case
journal_file_open() leaves half initialized file around but in online
state. Then the error is propagated and journald switches into volatile mode.
Next time a new message is received by journald, it tries to open the
persistent system journal file to switch automatically back to persistent
mode.
When opening the system journal, journal_file_open(), called by
managed_journal_file_open_reliably(), finds the persistent system journal left
previously and assumes that it was uncleanly closed and considers it as
corrupted. The error is reported to managed_journal_file_open_reliably(), which
backs the file up and attempts to create a new system file, which fails and
leaves a corrupted system file again.
Since this is done for each message received by journald, /var/log/message can
be filled with backup files pretty quickly.
To prevent this, the patch makes sure to delete the newly created file in case
of error.
Lennart Poettering [Mon, 28 Mar 2022 13:10:56 +0000 (15:10 +0200)]
man: document new udevadm lock tool
Lennart Poettering [Fri, 1 Apr 2022 12:27:45 +0000 (14:27 +0200)]
udevadm: add new "lock" verb for locking block devices
Lennart Poettering [Fri, 1 Apr 2022 12:21:44 +0000 (14:21 +0200)]
hash-funcs: tweak odering in devt_compare_func()
Let's order dev_t's by their major first, minor secondary. The binary
encoding of the two fields is weirdly interleaved and different in
kernel and glibc, hence let's focus on the generic part that works like
users would expect it.
So far the function is only used to compare for equality, not for
sorting, hence this has no immediate effect.
Lennart Poettering [Mon, 4 Apr 2022 13:20:19 +0000 (15:20 +0200)]
TODO
Frantisek Sumsal [Mon, 4 Apr 2022 13:56:00 +0000 (15:56 +0200)]
partition: use `udevadm wait`
Frantisek Sumsal [Mon, 4 Apr 2022 13:58:03 +0000 (15:58 +0200)]
test: use the new `udevadm wait` verb to wait for the loop device
The original workaround didn't work, as `systemd-repart` kept failing
even when the `/dev/loopX` device was present:
```
[ 13.959419] H testsuite-58.sh[280]: + LOOP=/dev/loop1
[ 13.959636] H testsuite-58.sh[280]: + :
[ 13.959764] H testsuite-58.sh[280]: + test -e /dev/loop1
[ 13.959895] H testsuite-58.sh[280]: + break
[ 13.960023] H testsuite-58.sh[280]: + systemd-repart --pretty=yes --definitions=/tmp/testsuite-58-sector/ --seed=
750b6cd5c4ae4012a15e7be3c29e6a47 --empty=require --dry-run=no /dev/loop1
[ 13.970538] H testsuite-58.sh[363]: Device '/dev/loop1' has no dm-crypt/dm-verity device, no need to look for underlying block device.
[ 13.970538] H testsuite-58.sh[363]: Failed to determine canonical path for '/dev/loop1': No such file or directory
[ 13.970538] H testsuite-58.sh[363]: Failed to open file or determine backing device of /dev/loop1: No such file or directory
```
Yu Watanabe [Mon, 4 Apr 2022 13:55:02 +0000 (22:55 +0900)]
Merge pull request #22943 from yuwata/dhcp6-client-requet-options
sd-dhcp6-client: requet options
Yu Watanabe [Mon, 4 Apr 2022 13:53:56 +0000 (22:53 +0900)]
Merge pull request #22952 from poettering/rework-kvm-hyperv
virt: tweak kvm with hyperv enlightenments
Lennart Poettering [Mon, 4 Apr 2022 10:55:12 +0000 (12:55 +0200)]
gpt: introduce common implementation of type uuid search loop
Lennart Poettering [Mon, 4 Apr 2022 10:45:21 +0000 (12:45 +0200)]
update TODO
Lennart Poettering [Mon, 4 Apr 2022 09:27:58 +0000 (11:27 +0200)]
virt: move array iterators to smaller scope, and use right type
Lennart Poettering [Mon, 4 Apr 2022 09:19:44 +0000 (11:19 +0200)]
virt: make virtualization enum a named type
These days we have a mechanism for safely returning errnos in enum
types, via definining -ERRNO_MAX as one special enu value. Let's use
that for Virtualization.
No change in behaviour, just some typesafety improvement.
Lennart Poettering [Mon, 4 Apr 2022 08:29:40 +0000 (10:29 +0200)]
virt: rework kvm with hyperv enlightenment checks a bit
Let's avoid extending the virtualization with an "alias" entry that has
the same string assigned as another.
The only reason this was done was to make the patch small that added a
second CPUID vendor string for kvm to the vm_table[] array. Let's
instead rework the array to use struct elements that match up strings
with ids. Given the array was previously mostly sparse this should be a
general improvement.
Fixes: #22950
Follow-up for: #22945
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2022 07:36:44 +0000 (09:36 +0200)]
bootctl: do not call acquire_esp() twice
That function is nasty because it modifies global state. We should call it just
once in each call path.
Also drop 'return 1' which doesn't seem to have any use.
Yu Watanabe [Fri, 11 Feb 2022 05:59:53 +0000 (14:59 +0900)]
sd-dhcp6-client: request several options
Even though these options are not currently used by sd-dhcp6-client,
RFC 8415 states these options MUST be requested.
Yu Watanabe [Sun, 3 Apr 2022 10:34:40 +0000 (19:34 +0900)]
network: dhcp6: request DNS servers or friends only when they will be used
Yu Watanabe [Sun, 3 Apr 2022 10:44:04 +0000 (19:44 +0900)]
dhcp: make option names singular
Yu Watanabe [Fri, 1 Apr 2022 16:13:24 +0000 (01:13 +0900)]
sd-dhcp6-client: sort requesting options
Yu Watanabe [Fri, 1 Apr 2022 16:11:32 +0000 (01:11 +0900)]
sd-dhcp6-client: rename req_opts_len -> n_req_opts
As 'len' is confusing and we may misunderstand it as the size of
the buffer instead of the number of options.
Brett Holman [Thu, 31 Mar 2022 20:04:57 +0000 (14:04 -0600)]
Identify kvm + hv_passthrough as "kvm"
dependabot[bot] [Fri, 1 Apr 2022 09:04:31 +0000 (09:04 +0000)]
build(deps): bump meson from 0.61.2 to 0.62.0 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 0.61.2 to 0.62.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.61.2...0.62.0)
---
updated-dependencies:
- dependency-name: meson
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 1 Apr 2022 09:04:12 +0000 (09:04 +0000)]
build(deps): bump actions/labeler from 3.1.0 to 4
Bumps [actions/labeler](https://github.com/actions/labeler) from 3.1.0 to 4.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/
3d612d72e6784a1a65365cc6d33b5a001c12bf10...
9fd24f1f9d6ceb64ba34d181b329ee72f99978a0)
---
updated-dependencies:
- dependency-name: actions/labeler
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 1 Apr 2022 09:04:08 +0000 (09:04 +0000)]
build(deps): bump actions/checkout from 2.4.0 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/
ec3a7ce113134d7a93b817d10a8272cb61118579...
a12a3943b4bdde767164f792f33f40b04645d846)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 1 Apr 2022 09:04:02 +0000 (09:04 +0000)]
build(deps): bump github/codeql-action from 1.1.3 to 2.1.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.1.3 to 2.1.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/
75f07e7ab2ee63cba88752d8c696324e4df67466...
28eead240834b314f7def40f6fcba65d100d99b1)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 1 Apr 2022 09:04:17 +0000 (09:04 +0000)]
build(deps): bump github/super-linter from 4.8.5 to 4.9.1
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.5 to 4.9.1.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/
b8641364ca9a79b3cf07f3c4c59a82709cd39094...
3792fe5373cf2f5b22d590fcbbc4533d735c573e)
---
updated-dependencies:
- dependency-name: github/super-linter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Lennart Poettering [Fri, 1 Apr 2022 15:01:29 +0000 (17:01 +0200)]
veritysetup: fix memory corruption
We must copy the option string, since in one case we are called with a
pointer into dynamic memory that will be freed by the caller.
As discussed here: https://github.com/systemd/systemd/pull/22908/files#r839394490
Follow-up for: #22908
Yu Watanabe [Fri, 1 Apr 2022 16:32:26 +0000 (01:32 +0900)]
Merge pull request #22939 from yuwata/tree-wide-space
tree-wide: add space after if, switch, for, and while
Yu Watanabe [Fri, 1 Apr 2022 15:34:27 +0000 (00:34 +0900)]
tree-wide: fix typo
Lennart Poettering [Thu, 31 Mar 2022 08:10:37 +0000 (10:10 +0200)]
udev: add /dev/disk/by-diskseq symlink for block devices
This adds another symlink for block devices:
/dev/disk/by-diskseq/<number>
where the number is the diskseq number as exposed by the kernel. It's
useful for apps because they can use it to open a device by diskseq, in
a way that is safe against device node reuse. I.e. if a device node path
like this is passed to an app it could open the device node via the
symlink and also parse the diskseq from the path. Once the device is
opened it could compare the parsed diskseq with the one returned by
BLKGETDISKSEQ on the open node, and if it matches they know they are
talking to the right device.
Fixes: #22906
Yu Watanabe [Fri, 1 Apr 2022 14:43:18 +0000 (23:43 +0900)]
Merge pull request #22926 from bluca/analyze_offline_filter
analyze: fix offline checks for syscall filter and 'native' architecture
Lennart Poettering [Fri, 1 Apr 2022 13:58:55 +0000 (15:58 +0200)]
Merge pull request #22921 from poettering/uid-range-tweaks
userns uid range tweaks: taint systemd if assigned userns uid range too short, and show userns uid range in userdbctl output
Yu Watanabe [Fri, 1 Apr 2022 13:37:21 +0000 (22:37 +0900)]
tree-wide: add a space after if, switch, for, and while
Yu Watanabe [Fri, 1 Apr 2022 13:28:13 +0000 (22:28 +0900)]
test: add space between arguments
Lennart Poettering [Fri, 1 Apr 2022 12:26:50 +0000 (14:26 +0200)]
path-util: use STR_IN_SET() where appropriate
Lennart Poettering [Fri, 25 Mar 2022 11:03:17 +0000 (12:03 +0100)]
notify: remove spurious whitespace
Lennart Poettering [Fri, 1 Apr 2022 13:22:43 +0000 (15:22 +0200)]
Merge pull request #22934 from poettering/tls-test-fix-root
tests: make test-resolved-stream suceed even when run as root with restrictive access mode on build tree dir
Lennart Poettering [Fri, 1 Apr 2022 08:43:49 +0000 (10:43 +0200)]
process-util: refactor APIs for reading /proc/self/xyz symlinks
The three functions for reading cwd, exe and root symlinks of processes
already share a common core: get_process_link_contents(). Let's refactor
that a bit, and move formatting of the /proc/self/ path into this helper
function instead of doing that in the caller, thus sharing more code.
While we are at it, make the return parameters optional, in case the
information if the links are readable is interesting, but the contents
is not. (This also means safe_getcwd() and readlinkat_malloc() are
updated to make the return parameter optional, as these are called by
the relevant three functions)
Luca Boccassi [Thu, 31 Mar 2022 23:54:53 +0000 (00:54 +0100)]
analyze: fix offline check for syscal filter
The deny/allow list check was inverted, if we are deny listing and the
hashmap contains the syscall then that's good
Fixes https://github.com/systemd/systemd/issues/22914
Luca Boccassi [Thu, 31 Mar 2022 23:53:29 +0000 (00:53 +0100)]
analyze: fix offline check for 'native' syscall architecture
Enum values are stored in the set, not strings
Yu Watanabe [Fri, 1 Apr 2022 09:41:03 +0000 (18:41 +0900)]
Merge pull request #22872 from yuwata/udevadm-wait
udevadm: introduce 'wait' command
Lennart Poettering [Thu, 31 Mar 2022 13:22:33 +0000 (15:22 +0200)]
userdbctl: also show available UID range in current userns
Containers generally have a smaller UID range assigned than host
systems. Let's visualize this in the user/group tables. We insert
markers for unavailable regions. This way display is identical to status
quo ante on host systems, but in containers unavailable ranges will be
shown as that.
And while we are at it, also hide well-known UID ranges when they are
outside of userns uid_map range. This is mostly about the "container"
range. It's pointless showing the cotnainer range (i.e. a range UID >
65535) if that range isn#t available in the container anyway.
Lennart Poettering [Thu, 31 Mar 2022 12:39:24 +0000 (14:39 +0200)]
update TODO
Lennart Poettering [Thu, 31 Mar 2022 12:37:29 +0000 (14:37 +0200)]
pid1: add taint flag if uid/gid userns range too small
This will taint systemd if invoked in containers that do not have the
full 16bit range of UIDs defined.
we pretty much need uid root…nobody to be defined for a variety of
purposes, hence let's add this taint flag. Of course taints are
graceful, but it at least communicates the mess in some way...
Lennart Poettering [Thu, 31 Mar 2022 12:28:32 +0000 (14:28 +0200)]
uid-range: replace uid_range_contains() by more generalized uid_range_covers()
The former checks if one UID is inside the uid range set. The latter
checks if a full UID range is inside the uid range set. The former is
hence a special case of the latter.
Lennart Poettering [Thu, 31 Mar 2022 12:28:00 +0000 (14:28 +0200)]
uid-range: add some overflow checks
Lennart Poettering [Thu, 31 Mar 2022 11:28:54 +0000 (13:28 +0200)]
uid-range: add new uid_range_load_userns() for loading /proc/self/uid_map
Lennart Poettering [Thu, 31 Mar 2022 11:11:16 +0000 (13:11 +0200)]
test: port test-uid-range to tests.h
Lennart Poettering [Thu, 31 Mar 2022 10:56:24 +0000 (12:56 +0200)]
uid-range: use size_t for array size
Lennart Poettering [Fri, 1 Apr 2022 08:56:41 +0000 (10:56 +0200)]
test-resolved-stream: before entering user/network namespaces check if that's safe
I regularly run my tests also as root, since some of the tested code
uses privileged APIs. The test-resolved-stream so far tried to run its
tests in a user/network namespace if that can be allocated. This caused
the tests to fail on my system where once the user namespace is opened
access to the build tree in my $HOME is prohibited (due to restricted
access modes on my home dir). Let's add a check for that: before
actually isolating the test in a user/network namespace, let's see if
that would make it impossible for us to access the build tree (which we
need to do load the TLS certificates the test requires).
This should make the test pass when run as root from a build tree with
restrictive access mode.
Lennart Poettering [Fri, 1 Apr 2022 08:52:47 +0000 (10:52 +0200)]
tests: modernize load_testdata_env() a bit
Let's add assert() around everyhing we don't expect to fail.
Port to path_extract_directory().
Log errrors from load_env_file_pairs() which we ignore.
Lennart Poettering [Fri, 1 Apr 2022 09:03:15 +0000 (11:03 +0200)]
update TODO
Yu Watanabe [Wed, 30 Mar 2022 20:04:56 +0000 (05:04 +0900)]
udev: use sd_device_open() where appropriate
Yu Watanabe [Wed, 30 Mar 2022 18:54:41 +0000 (03:54 +0900)]
test: add test for sd_device_open()
Yu Watanabe [Wed, 30 Mar 2022 18:29:23 +0000 (03:29 +0900)]
sd-device: introduce sd_device_open()
We usually open() device node obtained by sd_device_get_devname().
However, the device node corresponds to the sd-device object may be
already removed, and another device node with the same path may be
created, hence an unexpected device may be opened.
The sd_device_open() opens device node, and checks the devnum and
diskseq of opened devnum, to avoid the above possibility.
Prompted by https://github.com/systemd/systemd/issues/22906#issuecomment-
1082736443.
Yu Watanabe [Wed, 30 Mar 2022 18:25:45 +0000 (03:25 +0900)]
fd-util: rename loop_get_diskseq() -> fd_get_diskseq()
And move it from loop-util.[ch] -> fd-util.[ch]
Yu Watanabe [Wed, 30 Mar 2022 18:23:33 +0000 (03:23 +0900)]
basic/missing: move BLKGETDISKSEQ to missing_fs.h
As it is defined at linux/fs.h.
Yu Watanabe [Fri, 25 Mar 2022 20:38:18 +0000 (05:38 +0900)]
test: replace helper_wait_for_dev() with 'udevadm wait'
Yu Watanabe [Fri, 25 Mar 2022 20:01:40 +0000 (05:01 +0900)]
udevadm: introduce new 'wait' command
Prompted by https://github.com/systemd/systemd/pull/22717#issuecomment-
1067348496.
The new command 'udevadm wait' waits for device or device symlink being
created. This may be useful to wait for a device is processed by udevd
after e.g. formatting or partitioning the device.
Yu Watanabe [Mon, 28 Mar 2022 18:57:49 +0000 (03:57 +0900)]
test: add more tests for sd_device_new_from_xxx()
Yu Watanabe [Sun, 27 Mar 2022 14:38:36 +0000 (23:38 +0900)]
sd-device: introduce sd_device_new_from_devname()
and sd_device_new_from_path() which takes devname or syspath.
Lennart Poettering [Wed, 30 Mar 2022 14:11:28 +0000 (16:11 +0200)]
systemctl: show tainted state
Lennart Poettering [Wed, 30 Mar 2022 08:46:16 +0000 (10:46 +0200)]
pid1: check for kernels older than baseline
Let's make this detectable explicitly.
Luca Boccassi [Thu, 31 Mar 2022 21:11:03 +0000 (22:11 +0100)]
Merge pull request #22923 from poettering/userns-check-refactor
virt: minor running_in_userns() modernizations
Lennart Poettering [Thu, 31 Mar 2022 14:50:37 +0000 (16:50 +0200)]
Merge pull request #22919 from poettering/cryptsetup-tweaks
various minor tweaks to cryptsetup/veritysetup/integritysetup