Commit 2fd9ae2e authored by Lennart Poettering's avatar Lennart Poettering

bus: implement 'unixexec:' protocol

parent 021a1e78
......@@ -120,6 +120,9 @@ struct sd_bus {
int *fds;
unsigned n_fds;
char *exec_path;
char **exec_argv;
};
static inline void bus_unrefp(sd_bus **b) {
......@@ -145,6 +148,8 @@ static inline void bus_unrefp(sd_bus **b) {
#define BUS_FDS_MAX 1024
#define BUS_EXEC_ARGV_MAX 256
bool object_path_is_valid(const char *p);
bool interface_name_is_valid(const char *p);
bool service_name_is_valid(const char *p);
......
This diff is collapsed.
......@@ -29,8 +29,8 @@
/* TODO:
* - implicitly add stub introspection calls
* - implement unix exec protocol
* - server side
* - split out actual sending logic into backend-socket.c
*
* Later:
* - add page donation logic
......@@ -57,6 +57,7 @@ int sd_bus_open_user(sd_bus **ret);
int sd_bus_new(sd_bus **ret);
int sd_bus_set_address(sd_bus *bus, const char *address);
int sd_bus_set_fd(sd_bus *bus, int fd);
int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]);
int sd_bus_set_hello(sd_bus *bus, int b);
int sd_bus_set_negotiate_fds(sd_bus *bus, int b);
int sd_bus_start(sd_bus *ret);
......
......@@ -64,7 +64,7 @@ void strv_free(char **l) {
free(l);
}
char **strv_copy(char **l) {
char **strv_copy(char * const *l) {
char **r, **k;
k = r = new(char*, strv_length(l) + 1);
......@@ -84,7 +84,7 @@ char **strv_copy(char **l) {
return r;
}
unsigned strv_length(char **l) {
unsigned strv_length(char * const *l) {
unsigned n = 0;
if (!l)
......
......@@ -34,8 +34,8 @@ static inline void strv_freep(char ***l) {
strv_free(*l);
}
char **strv_copy(char **l) _malloc_;
unsigned strv_length(char **l);
char **strv_copy(char * const *l) _malloc_;
unsigned strv_length(char * const *l);
char **strv_merge(char **a, char **b);
char **strv_merge_concat(char **a, char **b, const char *suffix);
......@@ -56,7 +56,7 @@ static inline const char* STRV_IFNOTNULL(const char *x) {
return x ? x : (const char *) -1;
}
static inline bool strv_isempty(char **l) {
static inline bool strv_isempty(char * const *l) {
return !l || !*l;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment