X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fpolicy-deny.c;h=f36f21ec6953a9f92a98d7704e61f69111358f7e;hb=ec6f2d31293d8680a1f6dab8f53949b848bbae08;hp=5b2336a3c502ef2c0910a91b949b35b57a546c35;hpb=03f51daf2fcf82f4f3de6371aa6fb8a58555d5d2;p=src%2Fagl-compositor.git diff --git a/src/policy-deny.c b/src/policy-deny.c index 5b2336a..f36f21e 100644 --- a/src/policy-deny.c +++ b/src/policy-deny.c @@ -26,17 +26,13 @@ #include "ivi-compositor.h" #include "policy.h" -#ifdef HAVE_SMACK -#include -#endif - #include #include "shared/helpers.h" - -static const char *const applications_permitted[] = { "homescreen", "alexa-viewer", - "launcher", "hvac", - "navigation", "mediaplayer" }; +static const char *const applications_permitted[] = { + "homescreen", "alexa-viewer", "launcher", "hvac", + "navigation", "mediaplayer" +}; /* helper start searches the applications_permitted for the * app_id @@ -104,52 +100,11 @@ ivi_policy_default_surface_advertise_state_change(struct ivi_surface *surf, void return ivi_policy_verify_ivi_surface(surf); } -#ifdef HAVE_SMACK -static bool -ivi_policy_default_shell_bind_interface(void *client, void *interface) -{ - struct wl_interface *shell_interface = interface; - struct wl_client *conn_client = client; - - pid_t pid, uid, gid; - int client_fd; - char *label; - bool ret = false; - - wl_client_get_credentials(conn_client, &pid, &uid, &gid); - - client_fd = wl_client_get_fd(conn_client); - if (smack_new_label_from_socket(client_fd, &label) < 0) { - return ret; - } - - if (strcmp(shell_interface->name, "agl_shell") == 0) - if (strcmp(label, "User::App::homescreen") == 0) - ret = true; - - if (strcmp(shell_interface->name, "agl_shell_desktop") == 0) - if (strcmp(label, "User::App::launcher") == 0 || - strcmp(label, "User::App::alexa-viewer") == 0 || - strcmp(label, "User::App::tbtnavi") == 0 || - strcmp(label, "User::App::hvac") == 0) - ret = true; - - if (ret) - weston_log("Client with pid %d, uid %d, gid %d, allowed " - "to bind to %s for label %s\n", pid, uid, gid, - shell_interface->name, label); - - /* client responsible for free'ing */ - free(label); - return ret; -} -#else static bool ivi_policy_default_shell_bind_interface(void *client, void *interface) { return false; } -#endif static bool ivi_policy_default_allow_to_add(void *user_data)