From a6278b88305b237b02eabff0d870b57fe851822d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 11 Mar 2014 19:03:50 +0100 Subject: bus: replace sd_bus_label_{escape,unescape}() by new sd_bus_path_{encode,decode}() The new calls work similarly, but enforce a that a common, fixed bus path prefix is used. This follows discussions with Simon McVittie on IRC that it should be a good idea to make sure that people don't use the escaping applied here too wildly as anything other than the last label of a bus path. --- src/libsystemd/sd-bus/sd-memfd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libsystemd/sd-bus/sd-memfd.c') diff --git a/src/libsystemd/sd-bus/sd-memfd.c b/src/libsystemd/sd-bus/sd-memfd.c index 7c71476eee..8f9e236392 100644 --- a/src/libsystemd/sd-bus/sd-memfd.c +++ b/src/libsystemd/sd-bus/sd-memfd.c @@ -27,6 +27,7 @@ #include "util.h" #include "kdbus.h" +#include "bus-label.h" #include "sd-memfd.h" #include "sd-bus.h" @@ -56,7 +57,7 @@ _public_ int sd_memfd_new(sd_memfd **m, const char *name) { * set here, let's do the usual bus escaping to deal * with that. */ - g = sd_bus_label_escape(name); + g = bus_label_escape(name); if (!g) return -ENOMEM; @@ -76,7 +77,7 @@ _public_ int sd_memfd_new(sd_memfd **m, const char *name) { else { _cleanup_free_ char *e = NULL; - e = sd_bus_label_escape(pr); + e = bus_label_escape(pr); if (!e) return -ENOMEM; @@ -311,7 +312,7 @@ _public_ int sd_memfd_get_name(sd_memfd *m, char **name) { if (!n) return -ENOMEM; - e = sd_bus_label_unescape(n); + e = bus_label_unescape(n); if (!e) return -ENOMEM; -- cgit v1.2.3-54-g00ecf