diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-03-11 19:03:50 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-11 19:03:50 +0100 |
commit | a6278b88305b237b02eabff0d870b57fe851822d (patch) | |
tree | d826e248d401a18f07c45cfc0832907e861a2877 /src/libsystemd/sd-bus/sd-memfd.c | |
parent | 2be56ff1e49c8954a0899da701233acf053e95a4 (diff) |
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.
Diffstat (limited to 'src/libsystemd/sd-bus/sd-memfd.c')
-rw-r--r-- | src/libsystemd/sd-bus/sd-memfd.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |