linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Howard Chung <howardchung@google.com>
To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com
Cc: Yun-Hao Chung <howardchung@chromium.org>,
	Miao-chen Chou <mcchou@chromium.org>
Subject: [Bluez PATCH v9 05/13] plugins: new plugin
Date: Tue,  3 Aug 2021 19:43:09 +0800	[thread overview]
Message-ID: <20210803194127.Bluez.v9.5.Id0842634d98a21fbdfa5cc72c76a462a98bf6f40@changeid> (raw)
In-Reply-To: <20210803114317.801840-1-howardchung@google.com>

From: Yun-Hao Chung <howardchung@chromium.org>

This adds an initial code for a new plugin admin.

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
---

(no changes since v1)

 Makefile.plugins    |  5 +++++
 bootstrap-configure |  1 +
 configure.ac        |  4 ++++
 plugins/admin.c     | 30 ++++++++++++++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 plugins/admin.c

diff --git a/Makefile.plugins b/Makefile.plugins
index 4e6a72b0bdf6..69fb01001cc6 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -11,6 +11,11 @@ builtin_sources += plugins/autopair.c
 builtin_modules += policy
 builtin_sources += plugins/policy.c
 
+if ADMIN
+builtin_modules += admin
+builtin_sources += plugins/admin.c
+endif
+
 if NFC
 builtin_modules += neard
 builtin_sources += plugins/neard.c
diff --git a/bootstrap-configure b/bootstrap-configure
index 0efd83abc2c4..a34be832068e 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -30,4 +30,5 @@ fi
 		--enable-pie \
 		--enable-cups \
 		--enable-library \
+		--enable-admin \
 		--disable-datafiles $*
diff --git a/configure.ac b/configure.ac
index a5afaea6cfcd..0744860b89fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -364,6 +364,10 @@ AC_ARG_ENABLE(logger, AC_HELP_STRING([--enable-logger],
 		[enable HCI logger service]), [enable_logger=${enableval}])
 AM_CONDITIONAL(LOGGER, test "${enable_logger}" = "yes")
 
+AC_ARG_ENABLE(admin, AC_HELP_STRING([--enable-admin],
+		[enable admin policy plugin]), [enable_admin=${enableval}])
+AM_CONDITIONAL(ADMIN, test "${enable_admin}" = "yes")
+
 if (test "${prefix}" = "NONE"); then
 	dnl no prefix and no localstatedir, so default to /var
 	if (test "$localstatedir" = '${prefix}/var'); then
diff --git a/plugins/admin.c b/plugins/admin.c
new file mode 100644
index 000000000000..42866bcf7be2
--- /dev/null
+++ b/plugins/admin.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2021 Google LLC
+ *
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "src/log.h"
+#include "src/plugin.h"
+
+static int admin_init(void)
+{
+	DBG("");
+}
+
+static void admin_exit(void)
+{
+	DBG("");
+}
+
+BLUETOOTH_PLUGIN_DEFINE(admin, VERSION,
+			BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+			admin_init, admin_exit)
-- 
2.32.0.554.ge1b32706d8-goog


  parent reply	other threads:[~2021-08-03 11:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 11:43 [Bluez PATCH v9 00/13] Admin policy series Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 01/13] core: add is_allowed property in btd_service Howard Chung
2021-08-03 12:51   ` Admin policy series bluez.test.bot
2021-08-03 11:43 ` [Bluez PATCH v9 02/13] core: add device callbacks to adapter driver Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 03/13] core: add adapter and device allowed_uuid functions Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 04/13] core: block not allowed UUID connect in auth Howard Chung
2021-08-03 11:43 ` Howard Chung [this message]
2021-08-03 11:43 ` [Bluez PATCH v9 06/13] plugins/admin: add admin_policy adapter driver Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 07/13] plugins/admin: add ServiceAllowList method Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 08/13] plugins/admin: add ServiceAllowList property Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 09/13] plugins/admin: add device callbacks Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 10/13] plugins/admin: add AffectedByPolicy property Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 11/13] plugins/admin: persist policy settings Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 12/13] doc: add description of admin policy Howard Chung
2021-08-03 11:43 ` [Bluez PATCH v9 13/13] doc: add admin policy file storage description Howard Chung
2021-08-04 22:05 ` [Bluez PATCH v9 00/13] Admin policy series Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803194127.Bluez.v9.5.Id0842634d98a21fbdfa5cc72c76a462a98bf6f40@changeid \
    --to=howardchung@google.com \
    --cc=howardchung@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mcchou@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).