|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From ab64c275efac13ed8fb255e4b2ccf1c287aa0bc6 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From: Lennart Poettering <lennart@poettering.net>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Date: Wed, 26 Feb 2014 02:47:43 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Subject: [PATCH] Revert back to /var/run at a couple of problems
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
MIME-Version: 1.0
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Content-Type: text/plain; charset=UTF-8
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Content-Transfer-Encoding: 8bit
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
This partially reverts 41a55c46ab8fb4ef6727434227071321fc762cce
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Some specifications we want to stay compatibility actually document
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
/var/run, not /run, and we should stay compatible with that. In order to
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
make sure our D-Bus implementation works on any system, regardless if
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
running systemd or not, we should always use /var/run which is the
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
only path mandated by the D-Bus spec.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Similar, glibc hardcodes the utmp location to /var/run, and this is
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
public API, too.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
We simply do not support systems where /var/run is not a symlink → /run.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Hence both are equivalent. Staying compatible with upstream
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
specifications hence weighs more than cleaning up superficial
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
appearance.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
(cherry picked from commit df1e02046144f41176c32ed011369fd8dba36b76)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
man/runlevel.xml | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
src/libsystemd/sd-bus/sd-bus.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
diff --git a/man/runlevel.xml b/man/runlevel.xml
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
index 4db06dc..976753a 100644
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
--- a/man/runlevel.xml
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+++ b/man/runlevel.xml
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -124,7 +124,7 @@
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
<variablelist>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
- <term><filename>/run/utmp</filename></term>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ <term><filename>/var/run/utmp</filename></term>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
<listitem><para>The utmp database
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
<command>runlevel</command> reads the
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
index 1318272..636715f 100644
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
--- a/src/libsystemd/sd-bus/sd-bus.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+++ b/src/libsystemd/sd-bus/sd-bus.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -794,8 +794,8 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
machine = NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
b->sockaddr.un.sun_family = AF_UNIX;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
- strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
- b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket");
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket");
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
}
|