chiark / gitweb /
bus: validate the entire header more closely
[elogind.git] / src / libsystemd-bus / bus-internal.h
index b0e97915ccdf7e846bfd531d9f5d2aac2dc4f139..3c2478e8fd0216cbefbd767c2ed1a1647e9c146f 100644 (file)
@@ -108,6 +108,7 @@ static inline void bus_unrefp(sd_bus **b) {
 }
 
 #define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp)))
+#define _cleanup_bus_error_free_ __attribute__((cleanup(sd_bus_error_free)))
 
 #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC))
 
@@ -116,3 +117,14 @@ static inline void bus_unrefp(sd_bus **b) {
 
 #define BUS_MESSAGE_SIZE_MAX (64*1024*1024)
 #define BUS_AUTH_SIZE_MAX (64*1024)
+
+/* Defined by the specification as maximum size of an array in
+ * bytes */
+#define BUS_ARRAY_MAX_SIZE 67108864
+
+bool object_path_is_valid(const char *p);
+bool interface_name_is_valid(const char *p);
+bool service_name_is_valid(const char *p);
+bool member_name_is_valid(const char *p);
+
+#define error_name_is_valid interface_name_is_valid