From de0b89913cde96616705cf9f5592920ca4f32eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 22 Mar 2021 14:28:21 +0100 Subject: [PATCH 1/3] Partially revert "correct incorrect command in NEWS (#19048)" This reverts commit 6d18c13e79a0b3374599a3416a644a7837d5a1e6. The syntax like "0666" is very unclear. It only makes sense for some subset of people who do C programming. Let's use the much more sensible modern python syntax instead. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 10daec629d..ecb5df82b3 100644 --- a/NEWS +++ b/NEWS @@ -251,7 +251,7 @@ CHANGES WITH 248: be restored for individual services with NoExecPaths=/dev (or by allow- listing and excluding /dev from ExecPaths=). - * Permissions for /dev/vsock are now set to 0666, and /dev/vhost-vsock + * Permissions for /dev/vsock are now set to 0o666, and /dev/vhost-vsock and /dev/vhost-net are owned by the kvm group. * The hardware database has been extended with a list of fingerprint From d229704743b4740b4fc403d06b8e132e70ce7cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 22 Mar 2021 21:35:40 +0100 Subject: [PATCH 2/3] Reword and reindent comment Follow-up for 0e557eef37. --- src/basic/log.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/basic/log.c b/src/basic/log.c index 0e6023cff2..595db0c395 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -252,18 +252,14 @@ int log_open(void) { /* Do not call from library code. */ - /* This function is often called in preparation for being able - * to log. Let's make sure we don't clobber errno, so that a call - * to a logging function immediately following a log_open() call - * can still easily reference an error that happened immediately - * before the log_open() call. */ + /* This function is often called in preparation for logging. Let's make sure we don't clobber errno, + * so that a call to a logging function immediately following a log_open() call can still easily + * reference an error that happened immediately before the log_open() call. */ PROTECT_ERRNO; - /* If we don't use the console we close it here, to not get - * killed by SAK. If we don't use syslog we close it here so - * that we are not confused by somebody deleting the socket in - * the fs, and to make sure we don't use it if prohibit_ipc is - * set. If we don't use /dev/kmsg we still keep it open, + /* If we don't use the console, we close it here to not get killed by SAK. If we don't use syslog, we + * close it here too, so that we are not confused by somebody deleting the socket in the fs, and to + * make sure we don't use it if prohibit_ipc is set. If we don't use /dev/kmsg we still keep it open, * because there is no reason to close it. */ if (log_target == LOG_TARGET_NULL) { From ccd593a61c91907fee59d8058f1a02c5e2160437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 22 Mar 2021 21:45:04 +0100 Subject: [PATCH 3/3] man: say that .device units need udev This was implied by the need to tag them with "systemd", but let's make this obvious, since it's rather easy to trip over this as a user. Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1941458. --- man/systemd.device.xml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/man/systemd.device.xml b/man/systemd.device.xml index 255ca3373b..596d334d5d 100644 --- a/man/systemd.device.xml +++ b/man/systemd.device.xml @@ -26,11 +26,10 @@ Description - A unit configuration file whose name ends in - .device encodes information about a device unit - as exposed in the - sysfs/udev7 - device tree. + A unit configuration file whose name ends in .device encodes information about a + device unit as exposed in the + sysfs/udev7 device + tree. This may be used to define dependencies between devices and other units. This unit type has no specific options. See systemd.unit5 @@ -40,14 +39,10 @@ sections. A separate [Device] section does not exist, since no device-specific options may be configured. - systemd will dynamically create device units for all kernel - devices that are marked with the "systemd" udev tag (by default - all block and network devices, and a few others). This may be used - to define dependencies between devices and other units. To tag a - udev device, use TAG+="systemd" in the udev - rules file, see - udev7 - for details. + systemd will dynamically create device units for all kernel devices that are marked with the + systemd udev tag (by default all block and network devices, and a few others). Note + that if systemd-udev.service is not running, no device units will be + available (for example in a typical container). Device units are named after the /sys/ and /dev/ paths they control. Example: the @@ -57,6 +52,10 @@ name see systemd.unit5. + To tag a udev device, use TAG+="systemd" in the udev rules file, see + udev7 for details. + + Device units will be reloaded by systemd whenever the corresponding device generates a changed event. Other units can use ReloadPropagatedFrom= to react