summaryrefslogtreecommitdiffstats
path: root/src/responder/ifp/ifp_private.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-05-11 16:15:24 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-05-22 17:16:01 +0200
commit1a546ae8250c6dbcff0ce775fc811529e02c360c (patch)
tree3f7bab044826e198804619b1e7d4c6641ab79e23 /src/responder/ifp/ifp_private.h
parent35d420c5d4609b6e999920e38a9b2ec40a0e1ac4 (diff)
downloadsssd-1a546ae8250c6dbcff0ce775fc811529e02c360c.tar.gz
sssd-1a546ae8250c6dbcff0ce775fc811529e02c360c.tar.xz
sssd-1a546ae8250c6dbcff0ce775fc811529e02c360c.zip
IFP: Add utility functions to escape and unescape object paths
D-Bus spec says: Each element must only contain the ASCII characters "[A-Z][a-z][0-9]_" This patch adds two utility functions to escape raw input into format suitable for DBus and conversely transform escaped paths back into raw paths. Reviewed-by: Stef Walter <stefw@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder/ifp/ifp_private.h')
-rw-r--r--src/responder/ifp/ifp_private.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/responder/ifp/ifp_private.h b/src/responder/ifp/ifp_private.h
index e7fcaa4c3..75be038e4 100644
--- a/src/responder/ifp/ifp_private.h
+++ b/src/responder/ifp/ifp_private.h
@@ -69,9 +69,12 @@ errno_t ifp_req_create(struct sbus_request *dbus_req,
int ifp_req_create_handle_failure(struct sbus_request *dbus_req, errno_t err);
const char *ifp_path_strip_prefix(const char *path, const char *prefix);
+
+char *ifp_bus_path_unescape(TALLOC_CTX *mem_ctx, const char *path);
+char *ifp_bus_path_escape(TALLOC_CTX *mem_ctx, const char *path);
+
errno_t ifp_add_ldb_el_to_dict(DBusMessageIter *iter_dict,
struct ldb_message_element *el);
-
const char **ifp_parse_attr_list(TALLOC_CTX *mem_ctx, const char *conf_str);
bool ifp_attr_allowed(const char *whitelist[], const char *attr);
#endif /* _IFPSRV_PRIVATE_H_ */