summaryrefslogtreecommitdiff
path: root/src/bus-proxyd/proxy.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-01-17 18:07:58 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2015-01-17 18:27:23 +0100
commitc4bc1a8434f2a34840ea6f63064fa998ecfae738 (patch)
treec10ae7cfd3864cc74fc83c997baaf45e81215b48 /src/bus-proxyd/proxy.h
parentb58d857136496ee463223cd90af46512e9eef152 (diff)
bus-proxy: share policy between threads
This implements a shared policy cache with read-write locks. We no longer parse the XML policy in each thread. This will allow us to easily implement ReloadConfig().
Diffstat (limited to 'src/bus-proxyd/proxy.h')
-rw-r--r--src/bus-proxyd/proxy.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bus-proxyd/proxy.h b/src/bus-proxyd/proxy.h
index 08994fe502..21c34f1d38 100644
--- a/src/bus-proxyd/proxy.h
+++ b/src/bus-proxyd/proxy.h
@@ -37,8 +37,7 @@ struct Proxy {
sd_bus *dest_bus;
Set *owned_names;
- Policy policy_buffer;
- Policy *policy;
+ SharedPolicy *policy;
bool got_hello : 1;
};
@@ -46,7 +45,7 @@ struct Proxy {
int proxy_new(Proxy **out, int in_fd, int out_fd, const char *dest);
Proxy *proxy_free(Proxy *p);
-int proxy_load_policy(Proxy *p, char **configuration);
+int proxy_set_policy(Proxy *p, SharedPolicy *policy, char **configuration);
int proxy_hello_policy(Proxy *p, uid_t original_uid);
int proxy_run(Proxy *p);