diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-12 18:32:11 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-12 18:32:11 +0000 |
commit | bc983ecf15455f49e7a92d038c93e181ae2cb438 (patch) | |
tree | d53948dab970d81f07e195513804945b87a758e8 /bus/policy.h | |
parent | 4b773b4a5448ac9bea2cc57486571588fdc14480 (diff) | |
download | dbus-bc983ecf15455f49e7a92d038c93e181ae2cb438.tar.gz |
2003-04-12 Havoc Pennington <hp@pobox.com>
* bus/policy.h: change BusPolicy to be the thing from the config
file, and rename old BusPolicy to BusClientPolicy
* bus/bus.c, bus/connection.c, bus/config-parser.c: change to
match change in how policy works
* dbus/dbus-internals.h: mark assert_not_reached as
__attribute((noreturn))__
Diffstat (limited to 'bus/policy.h')
-rw-r--r-- | bus/policy.h | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/bus/policy.h b/bus/policy.h index 680ad581..194bd001 100644 --- a/bus/policy.h +++ b/bus/policy.h @@ -1,5 +1,5 @@ /* -*- mode: C; c-file-style: "gnu" -*- */ -/* policy.h Policies for what a connection can do +/* policy.h Bus security policy * * Copyright (C) 2003 Red Hat, Inc. * @@ -87,22 +87,31 @@ BusPolicyRule* bus_policy_rule_new (BusPolicyRuleType type, void bus_policy_rule_ref (BusPolicyRule *rule); void bus_policy_rule_unref (BusPolicyRule *rule); -BusPolicy* bus_policy_new (void); -void bus_policy_ref (BusPolicy *policy); -void bus_policy_unref (BusPolicy *policy); -dbus_bool_t bus_policy_check_can_send (BusPolicy *policy, - BusRegistry *registry, - DBusConnection *receiver, - DBusMessage *message); -dbus_bool_t bus_policy_check_can_receive (BusPolicy *policy, - BusRegistry *registry, - DBusConnection *sender, - DBusMessage *message); -dbus_bool_t bus_policy_check_can_own (BusPolicy *policy, - DBusConnection *connection, - const DBusString *service_name); -dbus_bool_t bus_policy_append_rule (BusPolicy *policy, - BusPolicyRule *rule); -void bus_policy_optimize (BusPolicy *policy); +BusPolicy* bus_policy_new (void); +void bus_policy_ref (BusPolicy *policy); +void bus_policy_unref (BusPolicy *policy); +BusClientPolicy* bus_policy_create_client_policy (BusPolicy *policy, + DBusConnection *connection); +dbus_bool_t bus_policy_allow_user (BusPolicy *policy, + unsigned long uid); + +BusClientPolicy* bus_client_policy_new (void); +void bus_client_policy_ref (BusClientPolicy *policy); +void bus_client_policy_unref (BusClientPolicy *policy); +dbus_bool_t bus_client_policy_check_can_send (BusClientPolicy *policy, + BusRegistry *registry, + DBusConnection *receiver, + DBusMessage *message); +dbus_bool_t bus_client_policy_check_can_receive (BusClientPolicy *policy, + BusRegistry *registry, + DBusConnection *sender, + DBusMessage *message); +dbus_bool_t bus_client_policy_check_can_own (BusClientPolicy *policy, + DBusConnection *connection, + const DBusString *service_name); +dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy, + BusPolicyRule *rule); +void bus_client_policy_optimize (BusClientPolicy *policy); + #endif /* BUS_POLICY_H */ |