From c8e7055577942f62c35b38e995708418197c7497 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 21 Aug 2018 19:28:53 +0000 Subject: [PATCH] Move all bluetooth related config files out of etc This helps with pkgbase by switching to CONFS so they are properly tagged as config files. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16833 --- etc/Makefile | 3 - etc/bluetooth/Makefile | 9 --- etc/bluetooth/hcsecd.conf | 56 ------------------- etc/defaults/Makefile | 4 -- lib/libbluetooth/Makefile | 3 + {etc/bluetooth => lib/libbluetooth}/hosts | 0 {etc/bluetooth => lib/libbluetooth}/protocols | 0 usr.sbin/bluetooth/hccontrol/Makefile | 2 + .../hccontrol}/bluetooth.device.conf | 0 usr.sbin/bluetooth/hcsecd/Makefile | 2 + usr.sbin/bluetooth/hcsecd/hcsecd.conf | 20 ++----- 11 files changed, 13 insertions(+), 86 deletions(-) delete mode 100644 etc/bluetooth/Makefile delete mode 100644 etc/bluetooth/hcsecd.conf rename {etc/bluetooth => lib/libbluetooth}/hosts (100%) rename {etc/bluetooth => lib/libbluetooth}/protocols (100%) rename {etc/defaults => usr.sbin/bluetooth/hccontrol}/bluetooth.device.conf (100%) diff --git a/etc/Makefile b/etc/Makefile index b813c362f37e..443364c706d8 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -141,9 +141,6 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ echo "./var/db/services.db type=file mode=0644 uname=root gname=wheel"; \ ) | ${METALOG.add} -.endif -.if ${MK_BLUETOOTH} != "no" - ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install diff --git a/etc/bluetooth/Makefile b/etc/bluetooth/Makefile deleted file mode 100644 index e2e3622d451e..000000000000 --- a/etc/bluetooth/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $Id: Makefile,v 1.2 2003/10/21 22:22:27 max Exp $ -# $FreeBSD$ - -FILESDIR= /etc/bluetooth -FILES= hcsecd.conf hosts protocols -FILESMODE_hcsecd.conf= 600 -FILESMODE_hosts= 644 - -.include diff --git a/etc/bluetooth/hcsecd.conf b/etc/bluetooth/hcsecd.conf deleted file mode 100644 index e6b95998f33b..000000000000 --- a/etc/bluetooth/hcsecd.conf +++ /dev/null @@ -1,56 +0,0 @@ -# $Id: hcsecd.conf,v 1.1 2003/05/26 22:50:47 max Exp $ -# $FreeBSD$ -# -# HCI security daemon configuration file -# -# Format: -# -# device { -# option value ; -# } -# -# Possible options and values -# -# Options Values -# ---------------------------------- -# bdaddr xx:xx:xx:xx:xx:xx ; - remote device BD_ADDR -# name "any char" ; - to set user friendly device name -# key 0x11223344 | nokey ; - to set link key for the device -# pin "secret" | nopin ; - to PIN code for the device -# -# Notes: -# -# Currently there is no way to select keys/PIN code based on which -# local device received the request. Everything is based on remote -# device BD_ADDR. -# -# "nokey" means that no link key has been defined and we should -# send Link_Key_Negative_Reply command to the device. -# -# "nopin" means that no PIN code has been defined and we should -# send PIN_Code_Negative_Reply command to the device -# - -# Default entry is applied if no better match found -# It MUST have 00:00:00:00:00:00 as bdaddr -device { - bdaddr 00:00:00:00:00:00; - name "Default entry"; - key nokey; - pin nopin; -} - -device { - bdaddr 00:01:02:03:04:05; - name "Dummy"; - key nokey; - pin "0000"; -} - -device { - bdaddr 00:11:22:33:44:55; - name "Dummy"; - key 0x00112233445566778899aabbccddeeff; # 16 bytes key (hex string) - pin nopin; -} - diff --git a/etc/defaults/Makefile b/etc/defaults/Makefile index 1ea65722370f..b85fb33ee6e0 100644 --- a/etc/defaults/Makefile +++ b/etc/defaults/Makefile @@ -5,8 +5,4 @@ FILES= devfs.rules FILESDIR= /etc/defaults -.if ${MK_BLUETOOTH} != "no" -FILES+= bluetooth.device.conf -.endif - .include diff --git a/lib/libbluetooth/Makefile b/lib/libbluetooth/Makefile index f6273ab5ce8f..96bf0cb704ec 100644 --- a/lib/libbluetooth/Makefile +++ b/lib/libbluetooth/Makefile @@ -2,6 +2,9 @@ # $FreeBSD$ PACKAGE= lib${LIB} +CONFS= hosts protocols +CONFSDIR= /etc/bluetooth +CONFSMODE_protocols= 444 LIB= bluetooth MAN= bluetooth.3 diff --git a/etc/bluetooth/hosts b/lib/libbluetooth/hosts similarity index 100% rename from etc/bluetooth/hosts rename to lib/libbluetooth/hosts diff --git a/etc/bluetooth/protocols b/lib/libbluetooth/protocols similarity index 100% rename from etc/bluetooth/protocols rename to lib/libbluetooth/protocols diff --git a/usr.sbin/bluetooth/hccontrol/Makefile b/usr.sbin/bluetooth/hccontrol/Makefile index a81fda4e350b..1d34c4b66af1 100644 --- a/usr.sbin/bluetooth/hccontrol/Makefile +++ b/usr.sbin/bluetooth/hccontrol/Makefile @@ -1,6 +1,8 @@ # $Id: Makefile,v 1.7 2003/08/14 20:06:17 max Exp $ # $FreeBSD$ +CONFS= bluetooth.device.conf +CONFSDIR= /etc/defaults PROG= hccontrol MAN= hccontrol.8 SRCS= send_recv.c link_policy.c link_control.c le.c\ diff --git a/etc/defaults/bluetooth.device.conf b/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf similarity index 100% rename from etc/defaults/bluetooth.device.conf rename to usr.sbin/bluetooth/hccontrol/bluetooth.device.conf diff --git a/usr.sbin/bluetooth/hcsecd/Makefile b/usr.sbin/bluetooth/hcsecd/Makefile index 684243d8fd7b..5520effdb10d 100644 --- a/usr.sbin/bluetooth/hcsecd/Makefile +++ b/usr.sbin/bluetooth/hcsecd/Makefile @@ -1,6 +1,8 @@ # $Id: Makefile,v 1.8 2003/08/14 20:06:20 max Exp $ # $FreeBSD$ +CONFS= hcsecd.conf +CONFSMODE_hcsecd.conf= 600 PROG= hcsecd MAN= hcsecd.8 hcsecd.conf.5 SRCS= hcsecd.c lexer.l parser.y diff --git a/usr.sbin/bluetooth/hcsecd/hcsecd.conf b/usr.sbin/bluetooth/hcsecd/hcsecd.conf index 127ce04b74d6..e6b95998f33b 100644 --- a/usr.sbin/bluetooth/hcsecd/hcsecd.conf +++ b/usr.sbin/bluetooth/hcsecd/hcsecd.conf @@ -1,5 +1,4 @@ -# -# $Id: hcsecd.conf,v 1.1 2002/11/24 20:22:39 max Exp $ +# $Id: hcsecd.conf,v 1.1 2003/05/26 22:50:47 max Exp $ # $FreeBSD$ # # HCI security daemon configuration file @@ -25,14 +24,14 @@ # local device received the request. Everything is based on remote # device BD_ADDR. # -# "nokey" means that no link key has been defined and we should +# "nokey" means that no link key has been defined and we should # send Link_Key_Negative_Reply command to the device. # -# "nopin" means that no PIN code has been defined and we should +# "nopin" means that no PIN code has been defined and we should # send PIN_Code_Negative_Reply command to the device # -# Default entry applied if no better match found +# Default entry is applied if no better match found # It MUST have 00:00:00:00:00:00 as bdaddr device { bdaddr 00:00:00:00:00:00; @@ -42,15 +41,8 @@ device { } device { - bdaddr 00:80:37:5e:4d:d4; - name "Ericsson T68 phone"; - key nokey; - pin "0000"; # PIN code (string up to 16 character) -} - -device { - bdaddr 00:01:03:fc:6e:ec; - name "3COM PCCARD"; + bdaddr 00:01:02:03:04:05; + name "Dummy"; key nokey; pin "0000"; }