1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

core: do not touch /run/systemd/systemd-units-load from user session instances

Follow-up for: 15b9243c0d
Fixes: https://github.com/systemd/systemd/issues/21911
This commit is contained in:
Luca Boccassi 2021-12-27 18:22:43 +00:00 committed by Yu Watanabe
parent e99f8605e2
commit 4b3ad81bfa

View File

@ -1728,9 +1728,10 @@ static void manager_ready(Manager *m) {
manager_catchup(m);
/* Create a file which will indicate when the manager started loading units the last time. */
(void) touch_file("/run/systemd/systemd-units-load", false,
m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD].realtime ?: now(CLOCK_REALTIME),
UID_INVALID, GID_INVALID, 0444);
if (MANAGER_IS_SYSTEM(m))
(void) touch_file("/run/systemd/systemd-units-load", false,
m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD].realtime ?: now(CLOCK_REALTIME),
UID_INVALID, GID_INVALID, 0444);
m->honor_device_enumeration = true;
}