diff options
author | 2020-06-09 13:18:11 +0300 | |
---|---|---|
committer | 2020-06-26 15:00:49 +0000 | |
commit | bbf173123cdd4c64330fbf77631a9ae120e7d09f (patch) | |
tree | 4492f4856d57438c10d401decc7eaa45813eae28 /src/policy-default.c | |
parent | 9827cfd255780640650f7c9667daa7802dc1bb34 (diff) |
policy: Add a new policy hook to restrict access to private extensions
In this manner we can control which clients can bind to which interface
(either the agl_shell one or the agl_shell_desktop one).
Bug-AGL: SPEC-3394
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I9da4b3596dc5980b325aada8f8fcc7a11431c755
Diffstat (limited to 'src/policy-default.c')
-rw-r--r-- | src/policy-default.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/policy-default.c b/src/policy-default.c index 735f5c5..23842ab 100644 --- a/src/policy-default.c +++ b/src/policy-default.c @@ -79,6 +79,12 @@ ivi_policy_default_surface_advertise_state_change(struct ivi_surface *surf, void } static bool +ivi_policy_default_shell_bind_interface(void *client, void *interface) +{ + return true; +} + +static bool ivi_policy_default_allow_to_add(void *user_data) { /* verify that policy rules can be added with ivi_policy_add() */ @@ -113,6 +119,7 @@ static const struct ivi_policy_api policy_api = { .surface_deactivate = ivi_policy_default_surface_deactivate, .surface_activate_by_default = ivi_policy_default_surface_activate_default, .surface_advertise_state_change = ivi_policy_default_surface_advertise_state_change, + .shell_bind_interface = ivi_policy_default_shell_bind_interface, .policy_rule_allow_to_add = ivi_policy_default_allow_to_add, .policy_rule_try_event = ivi_policy_default_try_event, }; |