mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-05 21:21:49 +00:00
Revert back to /var/run at a couple of problems
This partially reverts41a55c46abSome specifications we want to stay compatibility actually document /var/run, not /run, and we should stay compatible with that. In order to make sure our D-Bus implementation works on any system, regardless if running systemd or not, we should always use /var/run which is the only path mandated by the D-Bus spec. Similar, glibc hardcodes the utmp location to /var/run, and this is exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this public API, too. We simply do not support systems where /var/run is not a symlink → /run. Hence both are equivalent. Staying compatible with upstream specifications hence weighs more than cleaning up superficial appearance. (cherry picked from commitdf1e020461)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
a980c3fa6b
commit
ab64c275ef
+1
-1
@@ -124,7 +124,7 @@
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><filename>/run/utmp</filename></term>
|
||||
<term><filename>/var/run/utmp</filename></term>
|
||||
|
||||
<listitem><para>The utmp database
|
||||
<command>runlevel</command> reads the
|
||||
|
||||
@@ -794,8 +794,8 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid)
|
||||
machine = NULL;
|
||||
|
||||
b->sockaddr.un.sun_family = AF_UNIX;
|
||||
strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
||||
b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket");
|
||||
strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
||||
b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user