From f91c23f78525d2b429bc7c5b6ef597241864d3f3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 16 Sep 2022 09:26:07 +0900 Subject: [PATCH] sd-device-monitor: do not trigger assertion when uid_map is not empty Follow-up for c0aa23cf1ed4b3cbbcaf8b19d47e6e29dc28c9a0. --- src/libsystemd/sd-device/device-monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsystemd/sd-device/device-monitor.c b/src/libsystemd/sd-device/device-monitor.c index 8b1b01ee0f0..072c6b94d35 100644 --- a/src/libsystemd/sd-device/device-monitor.c +++ b/src/libsystemd/sd-device/device-monitor.c @@ -469,6 +469,7 @@ static bool check_sender_uid(sd_device_monitor *m, uid_t uid) { return true; if (m->n_uid_range == SIZE_MAX) { + m->n_uid_range = 0; r = uid_range_load_userns(&m->mapped_userns_uid_range, &m->n_uid_range, NULL); if (r < 0) log_monitor_errno(m, r, "Failed to load UID ranges mapped to the current user namespace, ignoring: %m"); -- 2.47.3