#include "ivi-compositor.h"
#include "policy.h"
+#ifdef HAVE_SMACK
+#include <sys/smack.h>
+#endif
+
+#include <string.h>
+
/*
* default policy implementation allows every action to be possible
*
return true;
}
+static bool
+ivi_policy_default_surface_advertise_state_change(struct ivi_surface *surf, void *user_data)
+{
+ /* verify that the surface should sent as notification */
+ return true;
+}
+
+/* we allow all applications to bind to private extensions. See the deny-all
+ * policy instead for how to retrieve the clients fd and its label to check
+ * against */
+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)
{
.surface_activate = ivi_policy_default_surface_activate,
.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,
};
if (!ivi->policy)
return -1;
+ weston_log("Installing 'allow-all' policy engine\n");
return 0;
}