]>
git.ipfire.org Git - thirdparty/systemd.git/log
Zbigniew Jędrzejewski-Szmek [Tue, 19 Apr 2022 10:44:26 +0000 (12:44 +0200)]
manager: prohibit clone3() in seccomp filters
RestrictNamespaces should block clone3() like flatpak:
https://github.com/flatpak/flatpak/commit/
a10f52a7565c549612c92b8e736a6698a53db330
clone3() passes arguments in a structure referenced by a pointer, so we can't
filter on the flags as with clone(). Let's disallow the whole function call.
Zbigniew Jędrzejewski-Szmek [Tue, 19 Apr 2022 09:56:23 +0000 (11:56 +0200)]
shared/seccomp: add note about clone2() being unimportant
In case anyone else starts wondering whether it should be listed
as I did…
Hans de Goede [Mon, 18 Apr 2022 18:36:39 +0000 (20:36 +0200)]
hwdb: 60-keyboard: Add Acer Aspire One AO532h keymappings
Add keymappings for the Acer Aspire One AO532h netbook.
Unmap the brightnesskeys because they send duplicate key events with
the ACPI video bus key events and add a mapping for the bluetooth
on/off hotkey.
Luca Boccassi [Mon, 18 Apr 2022 16:39:18 +0000 (18:39 +0200)]
nspawn: fix locating config files with --ephemeral
When --ephemeral is used, a random 16 characters suffix is added to the image
name, so matching on .nspawn files based on the image name no longer works.
Fixes https://github.com/systemd/systemd/issues/13297
davijosw [Mon, 18 Apr 2022 11:51:45 +0000 (08:51 -0300)]
hwdb: Update 60-keyboard.hwdb (#23074)
Fix Fn+F1 (toggle touchpad) that wasn't working.
Closes #23058
Yu Watanabe [Sun, 17 Apr 2022 22:02:10 +0000 (07:02 +0900)]
Merge pull request #23107 from yuwata/man-network-numeric-prefix
man: recommend that .network or friends should have a numeric prefix
Yu Watanabe [Sun, 17 Apr 2022 22:01:42 +0000 (07:01 +0900)]
Merge pull request #23101 from yuwata/sd-device-cleanups
sd-device: several cleanups
Yu Watanabe [Sun, 17 Apr 2022 17:09:58 +0000 (02:09 +0900)]
resolve: fix typo in dns_class_is_pseudo()
Luca Boccassi [Sat, 9 Apr 2022 17:38:06 +0000 (18:38 +0100)]
compression: add build-time option to select default
Compression and decompression are controlled by the same build flag,
so if one wants to use, say, LZ4 to compress, ZSTD has to be disabled,
which means one loses the ability to read zstd-compressed journals.
Add a default-compression meson option, that allows to select any of
the available compression algorithms as the default.
Yu Watanabe [Sun, 17 Apr 2022 07:09:57 +0000 (16:09 +0900)]
sd-device: rename arguments and variables
Yu Watanabe [Sun, 17 Apr 2022 07:09:11 +0000 (16:09 +0900)]
sd-device: fix possible use-of-uninitialized-value
Yu Watanabe [Sun, 17 Apr 2022 05:59:06 +0000 (14:59 +0900)]
sd-device: use ERRNO_IS_DEVICE_ABSENT() at one more place
Yu Watanabe [Sun, 17 Apr 2022 05:51:13 +0000 (14:51 +0900)]
sd-device: rename function arguments for storing results
Yu Watanabe [Sun, 17 Apr 2022 05:45:45 +0000 (14:45 +0900)]
sd-device: use correct type and parser for device node uid and gid
Yu Watanabe [Sun, 17 Apr 2022 05:29:07 +0000 (14:29 +0900)]
sd-device: shorten code a bit
Yu Watanabe [Sun, 17 Apr 2022 05:25:27 +0000 (14:25 +0900)]
sd-device: use path_extract_filename() at one more place
This also does several cleanups.
Yu Watanabe [Sun, 17 Apr 2022 04:38:39 +0000 (13:38 +0900)]
sd-device: reset sysname and sysnum on renaming
Yu Watanabe [Sun, 17 Apr 2022 04:11:08 +0000 (13:11 +0900)]
sd-device: reduce indentation
Yu Watanabe [Sun, 17 Apr 2022 04:07:38 +0000 (13:07 +0900)]
sd-device: verify new syspath on renaming
Yu Watanabe [Sun, 17 Apr 2022 18:58:29 +0000 (03:58 +0900)]
man: DHCPPrefixDelegation= needs to be enabled on downstream side for assigning delegated prefixes
Closes #23041.
Yu Watanabe [Sun, 17 Apr 2022 18:08:55 +0000 (03:08 +0900)]
man: recommend that .network or friends should have a numeric prefix
Closes #23105.
Yu Watanabe [Thu, 14 Apr 2022 08:12:10 +0000 (17:12 +0900)]
udevadm: info: also show parent devices by --tree
Luca Boccassi [Sun, 17 Apr 2022 19:24:38 +0000 (21:24 +0200)]
Merge pull request #23100 from yuwata/network-fix-tunnel-address-parser
network: fix tunnel address parser
Mike Gilbert [Sun, 17 Apr 2022 13:48:28 +0000 (09:48 -0400)]
Add test support for systemd-tmpfiles.standalone
Yu Watanabe [Sun, 17 Apr 2022 16:26:30 +0000 (01:26 +0900)]
Merge pull request #23093 from mrc0mmand/test-md-partitions
test: more MD coverage improvements
Frantisek Sumsal [Fri, 15 Apr 2022 17:01:45 +0000 (19:01 +0200)]
test: partition the MD device
Also, loop the assemble/disassemble part couple of times to test udev
even harder.
Resolves: #23092
Frantisek Sumsal [Sat, 16 Apr 2022 20:43:20 +0000 (05:43 +0900)]
test: cleanup after the MD + LVM test case as well
amarjargal [Fri, 15 Apr 2022 17:29:15 +0000 (01:29 +0800)]
systemctl: colorize "enabled" in 'systemctl status ...'
"enabled" state is highlighted in green and "disabled" state is
highlighted in yellow because I felt that white and grey colors were not
so distinguishable. Other states are not highlighted. Any other coloring
suggestions are welcome!
Closes #16932.
Yu Watanabe [Sun, 17 Apr 2022 00:29:24 +0000 (09:29 +0900)]
network: l2tp: refuse null address
Yu Watanabe [Sun, 17 Apr 2022 00:19:26 +0000 (09:19 +0900)]
network: tunnel: handle null address as "any"
Fixes oss-fuzz#44881 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44881).
Fixes #23098.
Frantisek Sumsal [Sat, 16 Apr 2022 09:36:02 +0000 (11:36 +0200)]
Revert "lgtm: disable cpp/missing-return (again)"
This reverts commit
000096f4c61477f96fbd9c48b2d772c7c690d259 .
After a couple of manual tests LGTM finally appears to have the fix for
https://github.com/github/codeql/issues/8409, so let's reenable the
check for the last time.
Yu Watanabe [Sat, 16 Apr 2022 05:33:58 +0000 (14:33 +0900)]
Merge pull request #23089 from yuwata/sd-device-use-path_extract_filename
sd-device: use path_extract_filename()
Yu Watanabe [Fri, 15 Apr 2022 16:36:51 +0000 (01:36 +0900)]
Merge pull request #23021 from fbuihuu/tmpfiles-fix-precedence-with-plus-sign
Tmpfiles fix precedence with plus sign
Zbigniew Jędrzejewski-Szmek [Tue, 12 Apr 2022 18:42:32 +0000 (20:42 +0200)]
shared/install: fix crash when reenable is called without --root
Yu Watanabe [Fri, 15 Apr 2022 05:06:56 +0000 (14:06 +0900)]
test: add tests for sd_device_get_sysnum()
Yu Watanabe [Fri, 15 Apr 2022 04:45:26 +0000 (13:45 +0900)]
sd-device: shorten code a bit
Yu Watanabe [Fri, 15 Apr 2022 04:29:53 +0000 (13:29 +0900)]
sd-device: use path_extract_filename() at one more place
Simon Ellmann [Wed, 13 Apr 2022 19:53:10 +0000 (04:53 +0900)]
networkctl: obey --full with lldp command
Do not ellipsize output when -l or --full is handed to networkctl lldp.
Fixes #22806.
Yu Watanabe [Fri, 15 Apr 2022 04:33:43 +0000 (13:33 +0900)]
fs-util: use path_extract_filename() at one more place
Yu Watanabe [Fri, 15 Apr 2022 11:11:58 +0000 (20:11 +0900)]
Merge pull request #23090 from yuwata/firewall-util-cleanups
firewall-util: cleanups
Yu Watanabe [Fri, 15 Apr 2022 08:38:31 +0000 (17:38 +0900)]
firewall-util: inline iterator and add several missing assertions
Yu Watanabe [Fri, 15 Apr 2022 08:37:52 +0000 (17:37 +0900)]
sd-netlink: use correct type of iterator
Yu Watanabe [Fri, 15 Apr 2022 05:30:55 +0000 (14:30 +0900)]
Merge pull request #23081 from mrc0mmand/more-md-tests
test: extend the MD coverage with more RAID levels and LVM
Jan Janssen [Thu, 14 Apr 2022 11:34:07 +0000 (13:34 +0200)]
boot: Add missing continue statements
Fortunately, this was not causing any issues as it will just try
the other option branches unsuccessfuly before going to the next
config line.
Lennart Poettering [Thu, 14 Apr 2022 16:37:32 +0000 (18:37 +0200)]
update TODO
Lennart Poettering [Thu, 14 Apr 2022 13:15:11 +0000 (15:15 +0200)]
update TODO
Frantisek Sumsal [Thu, 14 Apr 2022 10:54:16 +0000 (12:54 +0200)]
test: add a test case for MD + LVM + ext4
Frantisek Sumsal [Thu, 14 Apr 2022 10:30:42 +0000 (12:30 +0200)]
test: extend testcase_mdadm_basic() with RAID 5 and 10
Yu Watanabe [Thu, 14 Apr 2022 07:58:21 +0000 (16:58 +0900)]
Merge pull request #23073 from medhefgo/boot-fixes
boot: Some fixes
Eduard Tolosa [Thu, 14 Apr 2022 06:30:03 +0000 (01:30 -0500)]
Add ConditionCPUFeature to load-fragment-gperf.gperf (#23076)
Fixes #23075
Jan Janssen [Thu, 10 Mar 2022 11:32:15 +0000 (12:32 +0100)]
boot: Use correct device root when loading device trees
If the boot entry comes from a XBOOT partition, we have to load the device
tree from that instead of the ESP.
Jan Janssen [Wed, 16 Feb 2022 11:28:20 +0000 (12:28 +0100)]
boot: Fix integer format specifiers
gnu-efi only knows two sizes for formatting integers: 32bit without
a length prefix and 64bit with 'l' prefix. Provide a PRI-style format
specifier for (U)INTN so that Print() can read the right amount of
bytes instead of printing garbage or worse.
Lennart Poettering [Wed, 13 Apr 2022 20:26:50 +0000 (22:26 +0200)]
Merge pull request #23011 from mrc0mmand/TEST-64-md
test: add MD-related tests to TEST-64
Lennart Poettering [Wed, 13 Apr 2022 20:21:38 +0000 (22:21 +0200)]
Merge pull request #22759 from msekletar/issue-18077-long-sysfs-paths-hashing
Create "hashed" unit names from long paths
Yu Watanabe [Wed, 13 Apr 2022 18:45:39 +0000 (03:45 +0900)]
Merge pull request #23070 from poettering/devnum-split
basic: some devnum handling tweaks and refactorings
Yu Watanabe [Wed, 13 Apr 2022 18:45:14 +0000 (03:45 +0900)]
Merge pull request #22969 from poettering/udevadm-tree
udevadm: add new "udevadm info --tree" command
Michal Sekletar [Thu, 24 Mar 2022 18:24:16 +0000 (19:24 +0100)]
tests: reflect that we can now handle devices with very long sysfs paths
Frantisek Sumsal [Thu, 7 Apr 2022 16:03:17 +0000 (18:03 +0200)]
test: add MD-related tests to TEST-64
Yu Watanabe [Wed, 13 Apr 2022 14:09:14 +0000 (23:09 +0900)]
udev: set ID_IGNORE_DISKSEQ for md devices
Yu Watanabe [Wed, 13 Apr 2022 14:04:47 +0000 (23:04 +0900)]
udev: do not create disk/by-diskseq symlink when ID_IGNORE_DISKSEQ property is set
Yu Watanabe [Wed, 13 Apr 2022 14:01:33 +0000 (23:01 +0900)]
sd-device: skip diskseq verification when ID_IGNORE_DISKSEQ property is set
Some drivers do not announce the diskseq change.
E.g. for md devices, the kernel increments the diskseq *after*
emitting a 'change' uevent when backing block devices are added to
a md device, and udevd does not receive no uevent which contains
the new diskseq.
Lennart Poettering [Wed, 13 Apr 2022 14:25:32 +0000 (16:25 +0200)]
devnum-util: catch potential stack overruns early
Lennart Poettering [Wed, 13 Apr 2022 14:13:10 +0000 (16:13 +0200)]
devnum-util: define helper macros for formatting devnum major/minor pairs
And port some parts over.
Lennart Poettering [Wed, 13 Apr 2022 13:38:21 +0000 (15:38 +0200)]
basic: split out dev_t related calls into new devno-util.[ch]
No actual code changes, just splitting out of some dev_t handling
related calls from stat-util.[ch], they are quite a number already, and
deserve their own module now I think.
Also, try to settle on the name "devnum" as the name for the concept,
instead of "devno" or "dev" or "devid". "devnum" is the name exported in
udev APIs, hence probably best to stick to that. (this just renames a
few symbols to "devum", local variables are left untouched, to make the
patch not too invasive)
No actual code changes.
Yu Watanabe [Sun, 10 Apr 2022 16:42:59 +0000 (01:42 +0900)]
udev: create disk/by-diskseq symlink only when the device has diskseq
Follow-up for
0d08db7f89ee665a9dcb6dd66c1f9e203192e8ec .
Lennart Poettering [Tue, 5 Apr 2022 08:21:14 +0000 (10:21 +0200)]
update TODO
Lennart Poettering [Tue, 12 Apr 2022 16:30:49 +0000 (18:30 +0200)]
udevadm: use xopendirat() where appropriate
And while we are at it, let's use more appropriate open flags.
O_NONBLOCk is pointless in combination with O_NOFOLLOW.
O_NOFOLLOW makes a ton of sense otoh, since the inode is supposed to be
a dir, we just checked.
THe other flags are implied by xopendirat()
Lennart Poettering [Tue, 5 Apr 2022 08:20:18 +0000 (10:20 +0200)]
udevadm: add new --tree mode to "udevadm info"
sysfs is a tree, hence let's a mode that allows showing it as such.
Lennart Poettering [Mon, 11 Apr 2022 21:13:40 +0000 (23:13 +0200)]
sd-device: include parent devices in enumeration
Lennart Poettering [Tue, 12 Apr 2022 13:45:48 +0000 (15:45 +0200)]
sd-device: properly support some corner case syspath
Lennart Poettering [Tue, 12 Apr 2022 13:45:07 +0000 (15:45 +0200)]
sd-device: add some comments
Lennart Poettering [Tue, 12 Apr 2022 09:25:00 +0000 (11:25 +0200)]
sd-device: filter regular files when enumerating
Currently if enumerating with debug logging you'll likely see something
like this:
sd-device: the syspath "/sys/class/devcoredump/disabled" is not a directory.
sd-device: the syspath "/sys/class/firmware/timeout" is not a directory.
sd-device: the syspath "/sys/class/zram-control/hot_remove" is not a directory.
sd-device: the syspath "/sys/class/zram-control/hot_add" is not a directory.
sd-device: the syspath "/sys/class/drm/version" is not a directory.
This is because these sysfs classes place regular files in these
directories, which we so far didn't expect.
Let's filter them early, and only bother with enumerated inodes if they
actually are dirs or symlinks, i.e. can be kobject dirs. Regular file
definitely never are kobject dirs...
Lennart Poettering [Mon, 11 Apr 2022 21:00:52 +0000 (23:00 +0200)]
sd-device: split out checking of matches from enumerator_scan_dir_and_add_devices()
No change in behaviour, just some splitting out of code.
Lennart Poettering [Tue, 12 Apr 2022 09:42:30 +0000 (11:42 +0200)]
sd-device: generate e better error code when trying to allocate sd_device for non-dir
Currently, for sysfs paths outside of /sys/devices/ we do better
checking if something is a suitable path: we check if it's actually a
directory, and if not return ENODEV.
Let's make the codepath for nodes *inside* of /sys/device/ similar:
let's also return ENODEV if the path supplied is not a directory.
Previously, we'd return ENOTDIR in that case, which is quite confusing I
think.
Lennart Poettering [Mon, 11 Apr 2022 20:04:06 +0000 (22:04 +0200)]
sd-device: don't accept non-sysfs paths
There are some file systems mounted below /sys/ that are not actually
sysfs, i.e. are not arranged in a sysfs/kobject style. Let's refuse
those early. (Example, /sys/fs/cgroup/ and similar.)
(Also, let's add an env var for this, so that it can be turned off for
test cases.)
Lennart Poettering [Mon, 11 Apr 2022 20:02:23 +0000 (22:02 +0200)]
sd-device: use chase_symlinks() O_PATH fd
chase_symlinks() can return its last O_PATH fd to us. Let's use that and
make the access() check a bit tighter by going via faccessat() on the
O_PATH fd.
This doesn't really change too much, but is nice in context of the next
commit, which uses the O_PATH fd in one other way.
Lennart Poettering [Wed, 13 Apr 2022 11:44:30 +0000 (13:44 +0200)]
Merge pull request #23065 from poettering/env-var-generator
pid1: pass additional env vars about exec context to generators
Lennart Poettering [Tue, 12 Apr 2022 21:47:07 +0000 (23:47 +0200)]
update TODO
Lennart Poettering [Tue, 12 Apr 2022 21:29:36 +0000 (23:29 +0200)]
man: document new generator env vars
Lennart Poettering [Tue, 12 Apr 2022 21:00:45 +0000 (23:00 +0200)]
man: rebreak all paragraphs in systemd.generator(7)
Lennart Poettering [Tue, 12 Apr 2022 13:44:46 +0000 (15:44 +0200)]
pid1: pass useful env vars to generators
This is inspired by this:
https://github.com/systemd/zram-generator/blob/main/src/generator.rs#L29
Given it's easy for PID 1 to pass this to generators, I thin we should.
All generators not written by us likely want to know these things so
that the can adjust to the execution environment.
Zbigniew Jędrzejewski-Szmek [Wed, 13 Apr 2022 06:32:16 +0000 (08:32 +0200)]
Merge pull request #23002 from yuwata/udev-use-child-event
udev: use child event source
Lennart Poettering [Tue, 12 Apr 2022 20:57:17 +0000 (22:57 +0200)]
Merge pull request #23061 from poettering/chase-symlinks-tweaks,-new
some chase_symlinks() tweaks
Yu Watanabe [Tue, 12 Apr 2022 14:52:22 +0000 (23:52 +0900)]
core: use assert_se() which takes side-effect
Fixes #23059.
Yu Watanabe [Wed, 6 Apr 2022 18:00:20 +0000 (03:00 +0900)]
udev: use child event source to manage workers
Yu Watanabe [Wed, 6 Apr 2022 17:58:43 +0000 (02:58 +0900)]
udev: use EventResult type
This also adds EVENT_RESULT_SUCCESS for readability.
Yu Watanabe [Fri, 8 Apr 2022 23:50:44 +0000 (08:50 +0900)]
sd-event: make inotify event work after the process is forked
Yu Watanabe [Fri, 8 Apr 2022 23:50:02 +0000 (08:50 +0900)]
sd-event: do not kill a child process from another child
Yu Watanabe [Fri, 8 Apr 2022 23:28:33 +0000 (08:28 +0900)]
sd-event: do not update signal fd after PID is changed
Otherwise, child event source will not work after the process is forked
and the event source is unref()ed on the child process.
Yu Watanabe [Thu, 7 Apr 2022 06:21:56 +0000 (15:21 +0900)]
sd-event: set pid to event source after all setup processes finished
Otherwise, the assertion in source_disconnect() may be triggered,
Yu Watanabe [Fri, 8 Apr 2022 23:23:50 +0000 (08:23 +0900)]
sd-event: rebreak comments
Lennart Poettering [Tue, 12 Apr 2022 13:44:02 +0000 (15:44 +0200)]
chase-symlinks: prefer path_extract_directory() over dirname()
Lennart Poettering [Tue, 12 Apr 2022 13:43:39 +0000 (15:43 +0200)]
chase-symlinks: add comment for opaque argument
Lennart Poettering [Tue, 12 Apr 2022 13:43:23 +0000 (15:43 +0200)]
chase-symlinks: add missing OOM check
Lennart Poettering [Tue, 12 Apr 2022 13:43:13 +0000 (15:43 +0200)]
chase-symlinks: use empty_to_root() where appropriate
Lennart Poettering [Tue, 12 Apr 2022 13:41:48 +0000 (15:41 +0200)]
chase-symlinks: avoid using stack allocation for potentially huge paths
let's better be safe and use heap allocation for paths which might be
unbounded.
In particular as previously we copied the stack memory to heap anyway,
via a noop path_make_absolute_cwd() call.
Lennart Poettering [Tue, 12 Apr 2022 13:41:09 +0000 (15:41 +0200)]
chase-symlinks: use proper typedef for flags argument
Yu Watanabe [Tue, 12 Apr 2022 14:09:51 +0000 (23:09 +0900)]
Merge pull request #23057 from keszybz/various-doc-tweaks
Various doc tweaks
Zbigniew Jędrzejewski-Szmek [Tue, 12 Apr 2022 13:33:05 +0000 (15:33 +0200)]
man: add "internal" to "reference counter"
Zbigniew Jędrzejewski-Szmek [Tue, 12 Apr 2022 10:33:33 +0000 (12:33 +0200)]
docs/RELEASE: also mention syscall tables