- See https://raw.githubusercontent.com/systemd/systemd/v260-rc1/NEWS. Too many changes to list or discuss here.
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
From e364a55e4869288c3574c856c9c96ad174a204ac Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
|
Date: Sat, 30 Aug 2025 13:55:56 +0200
|
|
Subject: [PATCH 1/2] core: create userdb root directory with correct label
|
|
|
|
Set up the /run/systemd/userdb directory with the default SELinux context
|
|
on creation.
|
|
|
|
With version 257.7-1 on Debian the directory was automatically created with the
|
|
correct label. Starting with version 258 (only tested with 258~rc3-1) it no
|
|
longer is. Regression introduced in 736349958efe34089131ca88950e2e5bb391d36a.
|
|
|
|
[zjs: edited the patch to apply comments from review and update the description.]
|
|
---
|
|
src/core/varlink.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/core/varlink.c b/src/core/varlink.c
|
|
index ec4f8abad9..9a03bf9bda 100644
|
|
--- a/src/core/varlink.c
|
|
+++ b/src/core/varlink.c
|
|
@@ -6,6 +6,7 @@
|
|
#include "errno-util.h"
|
|
#include "manager.h"
|
|
#include "metrics.h"
|
|
+#include "mkdir-label.h"
|
|
#include "path-util.h"
|
|
#include "pidref.h"
|
|
#include "string-util.h"
|
|
@@ -469,7 +470,11 @@ static int varlink_server_listen_many_idempotent_sentinel(
|
|
if (!known_fresh && varlink_server_contains_socket(s, address))
|
|
continue;
|
|
|
|
- r = sd_varlink_server_listen_address(s, address, 0666 | SD_VARLINK_SERVER_MODE_MKDIR_0755);
|
|
+ r = mkdir_parents_label(address, 0755);
|
|
+ if (r < 0)
|
|
+ log_warning_errno(r, "Failed to create parent directory of '%s', ignoring: %m", address);
|
|
+
|
|
+ r = sd_varlink_server_listen_address(s, address, 0666);
|
|
if (r < 0) {
|
|
log_error_errno(r, "Failed to bind to varlink socket '%s': %m", address);
|
|
break;
|