mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-03 16:10:14 +01:00
Merge branch 'policy-hash' into 'main'
dbus-daemon: make policy checking faster See merge request dbus/dbus!294
This commit is contained in:
commit
8ccfe182fd
4 changed files with 978 additions and 721 deletions
|
|
@ -1490,6 +1490,15 @@ bus_connection_is_queued_owner_by_prefix (DBusConnection *connection,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
const DBusList *
|
||||
bus_connection_get_owned_services_list (DBusConnection *connection)
|
||||
{
|
||||
BusConnectionData *d;
|
||||
|
||||
d = BUS_CONNECTION_DATA (connection);
|
||||
return d->services_owned;
|
||||
}
|
||||
|
||||
void
|
||||
bus_connection_add_owned_service_link (DBusConnection *connection,
|
||||
DBusList *link)
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ void bus_connection_request_headers (DBusConnection *connection,
|
|||
/* called by policy.c */
|
||||
dbus_bool_t bus_connection_is_queued_owner_by_prefix (DBusConnection *connection,
|
||||
const char *name_prefix);
|
||||
const DBusList *bus_connection_get_owned_services_list (DBusConnection *connection);
|
||||
|
||||
/* called by signals.c */
|
||||
dbus_bool_t bus_connection_add_match_rule (DBusConnection *connection,
|
||||
|
|
|
|||
1683
bus/policy.c
1683
bus/policy.c
File diff suppressed because it is too large
Load diff
|
|
@ -59,7 +59,8 @@ struct BusPolicyRule
|
|||
BusPolicyRuleType type;
|
||||
|
||||
unsigned int allow : 1; /**< #TRUE if this allows, #FALSE if it denies */
|
||||
|
||||
unsigned int score : 20; /**< for keeping the importance of the rule */
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
|
|
@ -172,9 +173,6 @@ dbus_bool_t bus_client_policy_check_can_receive (BusClientPolicy *policy,
|
|||
dbus_int32_t *toggles);
|
||||
dbus_bool_t bus_client_policy_check_can_own (BusClientPolicy *policy,
|
||||
const DBusString *service_name);
|
||||
dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy,
|
||||
BusPolicyRule *rule);
|
||||
void bus_client_policy_optimize (BusClientPolicy *policy);
|
||||
|
||||
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
|
||||
dbus_bool_t bus_policy_check_can_own (BusPolicy *policy,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue