summaryrefslogtreecommitdiff
path: root/src/bus-proxyd/bus-xml-policy.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-01-17 21:18:52 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2015-01-17 21:18:52 +0100
commit7447362c530e3f7128f16a35d1e43da4251144cc (patch)
tree44798592452cd748e3f03bdd884ceee74728500f /src/bus-proxyd/bus-xml-policy.h
parent0d620e53360f8d1dd7fd750d26a9b273a6f4fc0b (diff)
bus-proxy: don't print error-messages if we check multiple dests
If we test the policy against multiple destination names, we really should not print warnings if one of the names results in DENY. Instead, pass the whole array of names to the policy and let it deal with it.
Diffstat (limited to 'src/bus-proxyd/bus-xml-policy.h')
-rw-r--r--src/bus-proxyd/bus-xml-policy.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/bus-proxyd/bus-xml-policy.h b/src/bus-proxyd/bus-xml-policy.h
index 9716772e68..f2ec1bbea4 100644
--- a/src/bus-proxyd/bus-xml-policy.h
+++ b/src/bus-proxyd/bus-xml-policy.h
@@ -26,6 +26,7 @@
#include "list.h"
#include "hashmap.h"
+#include "set.h"
typedef enum PolicyItemType {
_POLICY_ITEM_TYPE_UNSET = 0,
@@ -91,24 +92,43 @@ void policy_free(Policy *p);
bool policy_check_own(Policy *p, uid_t uid, gid_t gid, const char *name);
bool policy_check_hello(Policy *p, uid_t uid, gid_t gid);
+bool policy_check_one_recv(Policy *p,
+ uid_t uid,
+ gid_t gid,
+ int message_type,
+ const char *name,
+ const char *path,
+ const char *interface,
+ const char *member);
bool policy_check_recv(Policy *p,
uid_t uid,
gid_t gid,
int message_type,
- const char *name,
+ Set *names,
+ char **namesv,
const char *path,
const char *interface,
const char *member,
bool dbus_to_kernel);
+bool policy_check_one_send(Policy *p,
+ uid_t uid,
+ gid_t gid,
+ int message_type,
+ const char *name,
+ const char *path,
+ const char *interface,
+ const char *member);
bool policy_check_send(Policy *p,
uid_t uid,
gid_t gid,
int message_type,
- const char *name,
+ Set *names,
+ char **namesv,
const char *path,
const char *interface,
const char *member,
- bool dbus_to_kernel);
+ bool dbus_to_kernel,
+ char **out_used_name);
void policy_dump(Policy *p);