oxenstored: honour XEN_RUN_STORED in systemd C stub

Generate a _paths.h for that and add proper dependency.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: David Scott <dave@recoil.org>
This commit is contained in:
Wei Liu committed 2016-06-17 11:27:21 +01:00
1 parent 44e6ba4b33
commit 67a5ab831d
3 files changed
+12 -2

No files matched your search

+1
View File
@@ -349,6 +349,7 @@ tools/ocaml/libs/xentoollog/_xtl_levels.*
tools/ocaml/libs/xentoollog/xentoollog.ml
tools/ocaml/libs/xentoollog/xentoollog.mli
tools/ocaml/libs/xs/paths.ml
tools/ocaml/xenstored/_paths.h
tools/ocaml/xenstored/oxenstored
tools/ocaml/xenstored/oxenstored.conf
tools/ocaml/xenstored/paths.ml
+7
View File
@@ -30,6 +30,8 @@ systemd_OBJS = systemd
systemd_C_OBJS = systemd_stubs
OCAML_LIBRARY += systemd
$(foreach obj,$(systemd_C_OBJS),$(obj).o): _paths.h
LIBS_systemd += $(LDFLAGS-y)
OBJS = paths \
@@ -93,3 +95,8 @@ genpath-target = $(call buildmakevars2module,paths.ml)
$(eval $(genpath-target))
GENERATED_FILES += paths.ml
genpath-target = $(call buildmakevars2header,_paths.h)
$(eval $(genpath-target))
GENERATE_FILES += _paths.h
+4 -2
View File
@@ -28,6 +28,8 @@
#include <sys/socket.h>
#include <systemd/sd-daemon.h>
#include "_paths.h"
/* Will work regardless of the order systemd gives them to us */
static int oxen_get_sd_fd(const char *connect_to)
{
@@ -46,8 +48,8 @@ static int oxen_get_sd_fd(const char *connect_to)
static int oxen_verify_socket_socket(const char *connect_to)
{
if ((strcmp("/var/run/xenstored/socket_ro", connect_to) != 0) &&
(strcmp("/var/run/xenstored/socket", connect_to) != 0)) {
if ((strcmp(XEN_RUN_STORED "/socket_ro", connect_to) != 0) &&
(strcmp(XEN_RUN_STORED "/socket", connect_to) != 0)) {
sd_notifyf(0, "STATUS=unexpected socket: %s\n"
"ERRNO=%i",
connect_to,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.