Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp374298pxf; Thu, 1 Apr 2021 03:33:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcl5CTykAlCEa2241alxSK7RWhOl91KVLxv1rK5alfAo/4rVwgIRy9mAJj06+LF8OKoy8W X-Received: by 2002:a17:906:c414:: with SMTP id u20mr8202459ejz.215.1617273234478; Thu, 01 Apr 2021 03:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617273234; cv=none; d=google.com; s=arc-20160816; b=BaLa3Bi8a10qsr1U7RCrbvi59u8rWZ306hU6Ioej431wKgyt1VkMFyNh9F4F7DbI5T D+8nyh8fSwK5u2B3LzsOTUH+GmFM1sQDBLiKfM1+GqlbiVsMGEqr2iii1eCGB8cA+W5F gsRGje3SI9kDiyGB37lvrqpOrOvudomhDfZEa2ZrYzsvhrqzg8y6fC/P3qt8bqMeN/X6 2ZRlkbJH081zim49gGW4+fO/0XzFxPKst9sfeMd6wbKk+GSy367TJP2NziqNkE2xxtFT o47hOGuMztR171yqjiAGzl2zoHzAvZue4tmv+AlpX7J8L/H729mO+0BzoaL0UlAJQ7Ed 0GyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=SGRhxAAUWsUnK57Aa5xc6CZnfRHteowX4OjsvjNaSZw=; b=XkXyXJtYqNNlUwN4Ud5vj7yHhZMy+zojSV2JNs73DXwFq2Y/I6bNt4fXIYCQdQoV3d bNZshLIW0PQikpB6EEaxvR+fR1ulH2K3Jm6r/j7JxzFu0k8FQCy6xkyDNXFuPh5RrKYD 8EeSZUobmemyohogMbrW6qkJMSUBNLS4lpQJ1TpXvBm+LFg48BaIoVQ4RZAPkxPGN3o5 Vu3jTnSjPnQapKzRVH7YL1tr4g1BGqNdl1W8fqHLoo6lIyUEStsSbhXI0pAY/5DkSORR HrPA28GrjdsW6mN1Tgw8BHXALmh64wmgktZyRr6fCT2FOus7jPT4azZnr7lx/UB9mFtD xSMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jSRaxJED; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo3si3800960ejb.121.2021.04.01.03.33.32; Thu, 01 Apr 2021 03:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jSRaxJED; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234139AbhDAK2I (ORCPT + 99 others); Thu, 1 Apr 2021 06:28:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234015AbhDAK1u (ORCPT ); Thu, 1 Apr 2021 06:27:50 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D538C06178A for ; Thu, 1 Apr 2021 03:25:16 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id y13so5242429ybk.20 for ; Thu, 01 Apr 2021 03:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=SGRhxAAUWsUnK57Aa5xc6CZnfRHteowX4OjsvjNaSZw=; b=jSRaxJED5wydHwLBE3dp4YyA+hBjmovkiex1Ldg0igKaCQR3sna0e8FagyV4gUZnNE L3OxaClhO6r3XaTs+lR29NzgwE2+tPKMBe0kMA1KAUzKuU4XpdYezh6yf6jwyjSg29kb FWKySt4hPsRK8tsTouIU8hfx0p2D65Bobx5FE3/DKz5MVxnOnJR/hDkkFPb0U5SOrxJ4 0tNCMN/9QIsMwIZbld6xNmeNwCQe1/l1r76zG7akNRm4wn4sse8LL0Gu/YyrtdfZvmnt Z9R2OcFYyWCDsuaMeaFYeucjKE2C9hsK6ot2PnKGAsnTx3a56DXNgtg2vdLXaxIbcxJO aqng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=SGRhxAAUWsUnK57Aa5xc6CZnfRHteowX4OjsvjNaSZw=; b=l7dxe2PQ4akbxwLYP0VhbzuOCYKF2Izgl0SWK3sF1OY5a9tW0+SDnpJd3X/H+JdAAa +Od4oObp4jgy/VxYWVOO6ZV5AjiNjz3KLv0/maCFkee8cNJML3KgxUcEkHAAcsz7Jbut bvev5SHqeE1Z+kPjElQ2QlMcDF3Sb2qVCmy6j4gI+hfah1+c2eU4cR3f0x9e6lAHL50O cfwB0I8r87KqWLSi9tNGqhv42lOUBP7pHQFoa/GGQj7YF7jtgdbT19f76sETxJhdi/Sq hg3cm4dlvHVj9/9brqRBX2fmWIIMOBuoNldWBLK61kUuczerUbggo/3bRh1J7n29kZWJ PYeQ== X-Gm-Message-State: AOAM532g6LmVCtyCG06cAF225isrvry2g2HoSpxJmR0BF1RCukIfWY6O ldDLopNoy/esC0tsO0qMblPpTA6IOTuOwtBvPF9Nx1Mybw7oH5OXEPooSr136g5V4u9N76oGZ6j S+gK2MPJtDBrMSorixwKn8Mj2/xLJxzVpXpOo+S2XZrtXqg7XP3L36rNSAg38J0YPSGyYJTG8CJ S776WrpD7jn8w= X-Received: from howardchung-p920.tpe.corp.google.com ([2401:fa00:1:10:ad88:abe:9fd5:a5fc]) (user=howardchung job=sendgmr) by 2002:a25:d451:: with SMTP id m78mr11430504ybf.105.1617272715501; Thu, 01 Apr 2021 03:25:15 -0700 (PDT) Date: Thu, 1 Apr 2021 18:24:39 +0800 Message-Id: <20210401102447.3958224-1-howardchung@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog Subject: [Bluez PATCH 0/8] Hi Linux-bluetooth, From: Howard Chung To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com Cc: Yun-Hao Chung Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Yun-Hao Chung This series is to add a new method |SetServiceAllowList| in D-Bus API to control what services can be connected by specifying UUID allow list. Users can query a device property |IsBlockedByPolicy| to tell if some of the services are currently restricted. Since we plan to add more methods to limit different bluetooth functionalities, we also introduce a new interface for this purpose. This series has been tested via sending commands with dbus-send manually on chromebook octopus and eve. Thanks, Howard Howard Chung (7): doc: add description of SetServiceAllowList lib: add hash functions for bt_uuid_t core: add AdminPolicy Interface input/hog: block connection by policy audio: Remove Media1 interface when a2dp source disallowed core: add properties IsBlockedByPolicy and ServiceAllowList core: store ServiceAllowList into settings Sonny Sasaka (1): core: Initialize uuid_str_arr to NULL Makefile.am | 3 +- doc/admin_policy-api.txt | 34 +++++ doc/device-api.txt | 7 + lib/uuid.c | 21 +++ lib/uuid.h | 3 + profiles/audio/a2dp.c | 2 + profiles/audio/avrcp.c | 3 + profiles/input/hog.c | 22 +++ src/adapter.c | 148 +++++++++++++++++++- src/adapter.h | 5 + src/admin_policy.c | 292 +++++++++++++++++++++++++++++++++++++++ src/admin_policy.h | 23 +++ src/device.c | 79 ++++++++++- src/device.h | 2 + src/profile.c | 39 ++++++ src/profile.h | 5 + src/service.c | 21 +++ src/service.h | 1 + 18 files changed, 705 insertions(+), 5 deletions(-) create mode 100644 doc/admin_policy-api.txt create mode 100644 src/admin_policy.c create mode 100644 src/admin_policy.h -- 2.31.0.291.g576ba9dcdaf-goog