*client, const es_message_t *msg) { switch (msg->event_type) { case ES_EVENT_TYPE_AUTH_EXEC: handle_exec(client, msg); break; default: if (msg->action_type == ES_ACTION_TYPE_AUTH) { es_respond_auth_result(client, msg, ES_AUTH_RESULT_ALLOW, true); } break; } } static void handle_exec(es_client_t *client, const es_message_t *msg) { if (strcmp(msg->event.exec.target->signing_id.data, "com.apple.nc") == 0) { es_respond_auth_result(client, msg, ES_AUTH_RESULT_DENY, true); } else { es_respond_auth_result(client, msg, ES_AUTH_RESULT_ALLOW, true); } }