Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 19:28:53 +0000 (UTC)
From:      Brad Davis <brd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338155 - in head: etc etc/bluetooth etc/defaults lib/libbluetooth usr.sbin/bluetooth/hccontrol usr.sbin/bluetooth/hcsecd
Message-ID:  <201808211928.w7LJSrEo019244@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brd
Date: Tue Aug 21 19:28:53 2018
New Revision: 338155
URL: https://svnweb.freebsd.org/changeset/base/338155

Log:
  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

Added:
  head/lib/libbluetooth/hosts
     - copied unchanged from r338154, head/etc/bluetooth/hosts
  head/lib/libbluetooth/protocols
     - copied unchanged from r338154, head/etc/bluetooth/protocols
  head/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf
     - copied unchanged from r338154, head/etc/defaults/bluetooth.device.conf
Replaced:
  head/usr.sbin/bluetooth/hcsecd/hcsecd.conf
     - copied unchanged from r338154, head/etc/bluetooth/hcsecd.conf
Deleted:
  head/etc/bluetooth/
  head/etc/defaults/bluetooth.device.conf
Modified:
  head/etc/Makefile
  head/etc/defaults/Makefile
  head/lib/libbluetooth/Makefile
  head/usr.sbin/bluetooth/hccontrol/Makefile
  head/usr.sbin/bluetooth/hcsecd/Makefile

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile	Tue Aug 21 19:17:35 2018	(r338154)
+++ head/etc/Makefile	Tue Aug 21 19:28:53 2018	(r338155)
@@ -142,9 +142,6 @@ distribution:
 		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
 	${_+_}cd ${.CURDIR}/mtree; ${MAKE} install

Modified: head/etc/defaults/Makefile
==============================================================================
--- head/etc/defaults/Makefile	Tue Aug 21 19:17:35 2018	(r338154)
+++ head/etc/defaults/Makefile	Tue Aug 21 19:28:53 2018	(r338155)
@@ -5,8 +5,4 @@
 FILES=	devfs.rules
 FILESDIR= /etc/defaults
 
-.if ${MK_BLUETOOTH} != "no"
-FILES+=	bluetooth.device.conf
-.endif
-
 .include <bsd.prog.mk>

Modified: head/lib/libbluetooth/Makefile
==============================================================================
--- head/lib/libbluetooth/Makefile	Tue Aug 21 19:17:35 2018	(r338154)
+++ head/lib/libbluetooth/Makefile	Tue Aug 21 19:28:53 2018	(r338155)
@@ -2,6 +2,9 @@
 # $FreeBSD$
 
 PACKAGE=	lib${LIB}
+CONFS=		hosts protocols
+CONFSDIR=	/etc/bluetooth
+CONFSMODE_protocols=	444
 LIB=		bluetooth
 MAN=		bluetooth.3
 

Copied: head/lib/libbluetooth/hosts (from r338154, head/etc/bluetooth/hosts)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libbluetooth/hosts	Tue Aug 21 19:28:53 2018	(r338155, copy of r338154, head/etc/bluetooth/hosts)
@@ -0,0 +1,10 @@
+# $Id: hosts,v 1.1 2003/05/21 17:48:40 max Exp $
+# $FreeBSD$
+#
+# Bluetooth Host Database
+#
+# This file should contain the Bluetooth addresses and aliases for hosts.
+#
+# BD_ADDR               Name [ alias0 alias1 ... ]
+
+# 00:11:22:33:44:55	phone

Copied: head/lib/libbluetooth/protocols (from r338154, head/etc/bluetooth/protocols)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libbluetooth/protocols	Tue Aug 21 19:28:53 2018	(r338155, copy of r338154, head/etc/bluetooth/protocols)
@@ -0,0 +1,22 @@
+# $Id: protocols,v 1.2 2003/05/21 22:17:14 max Exp $
+# $FreeBSD$
+#
+# Bluetooth Protocol/Service Multiplexor (PSM) names and numbers
+#
+# See also
+# https://www.bluetooth.org/foundry/assignnumb/document/assigned_numbers
+#
+# Protocol       PSM Alias         Reference
+
+sdp              1   SDP           # Service Discovery Protocol
+rfcomm           3   RFCOMM        # RFCOMM with TS 07.10
+tcs-bin          5   TCS-BIN       # Telephony Control Specification
+tcs-bin-cordless 7   TCS-BIN-CORDLESS # Telephony Control Specification
+bnep             15  BNEP          # Bluetooth Network Encapsulation Protocol
+hid-control      17  HID-Control   # Human Interface Device (control)
+hid-interrupt    19  HID-Interrupt # Human Interface Device (interrupt)
+upnp             21  UPnP          # See ESDP, Bluetooth SIG
+avctp            23  AVCTP         # Audio/Video Control Transport Protocol
+avdtp            25  AVDTP         # Audio/Video Distribution Transport Protocol
+udi-c-plane      29  UDI-C-Plane   # Unrestricted Digital Information Profile
+

Modified: head/usr.sbin/bluetooth/hccontrol/Makefile
==============================================================================
--- head/usr.sbin/bluetooth/hccontrol/Makefile	Tue Aug 21 19:17:35 2018	(r338154)
+++ head/usr.sbin/bluetooth/hccontrol/Makefile	Tue Aug 21 19:28:53 2018	(r338155)
@@ -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\

Copied: head/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf (from r338154, head/etc/defaults/bluetooth.device.conf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf	Tue Aug 21 19:28:53 2018	(r338155, copy of r338154, head/etc/defaults/bluetooth.device.conf)
@@ -0,0 +1,111 @@
+# Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+# The authentication_enable parameter controls if the device requires to
+# authenticate the remote device at connection setup. At connection setup,
+# only the devices with the authentication_enable parameter enabled will
+# try to authenticate the other device.
+#
+# Possible values:
+#
+# NO  or 0	authentication disabled (default);
+# YES or 1	authentication enabled.
+
+# authentication_enable="NO"
+
+# The class parameter is used to indicate the capabilities of the device to
+# other devices.
+#
+# For more details see "Assigned Numbers - Bluetooth Baseband" document
+#
+# Possible value:
+#
+# xx:xx:xx	where xx is a hex number
+
+# class="ff:01:0c"
+
+# The connectable parameter controls whether or not the device should
+# periodically scan for page attempts from other devices.
+#
+# Possible values:
+#
+# NO  or 0	do not scan for page attempts;
+# YES or 1	scan for page attempts (default).
+
+# connectable="YES"
+
+# The discoverable parameter controls whether or not the device should
+# periodically scan for inquiry requests from other devices.
+#
+# Possible values:
+#
+# NO  or 0	do not scan for inquiry requests;
+# YES or 1	scan for inquiry requests (default).
+
+# discoverable="NO"
+
+# The encryption_mode parameter controls if the device requires encryption
+# to the remote device at connection setup. At connection setup, only the
+# devices with the authentication_enable parameter enabled and encryption_mode
+# parameter enabled will try to encrypt the connection to the other device.
+#
+# Possible values:
+#
+# NONE or 0	encryption disabled (default);
+# P2P  or 1	encryption only for point-to-point packets;
+# ALL  or 2	encryption for both point-to-point and broadcast packets.
+
+# encryption_mode="NONE"
+
+# HCI node debug level. Higher values mean more verbose output.
+#
+# Possible values: 0 - 4
+
+# hci_debug_level="3"
+
+# L2CAP node debug level. Higher values mean more verbose output.
+#
+# Possible values: 0 - 4
+
+# l2cap_debug_level="3"
+
+# The local_name parameter provides the ability to modify the user friendly
+# name for the device.
+
+# local_name="My device"
+
+# The role_switch parameter controls whether the local device should perform
+# role switch. By default, if role switch is supported, the local device will
+# try to perform role switch and become Master on incoming connection. Some
+# devices do not support role switch and thus incoming connections from such
+# devices will fail. If role switch is disabled then accepting device will
+# remain Slave.
+#
+# NO  or 0	do not perform role switch;
+# YES or 1	perform role switch (default).
+
+# role_switch="YES"
+

Modified: head/usr.sbin/bluetooth/hcsecd/Makefile
==============================================================================
--- head/usr.sbin/bluetooth/hcsecd/Makefile	Tue Aug 21 19:17:35 2018	(r338154)
+++ head/usr.sbin/bluetooth/hcsecd/Makefile	Tue Aug 21 19:28:53 2018	(r338155)
@@ -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

Copied: head/usr.sbin/bluetooth/hcsecd/hcsecd.conf (from r338154, head/etc/bluetooth/hcsecd.conf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bluetooth/hcsecd/hcsecd.conf	Tue Aug 21 19:28:53 2018	(r338155, copy of r338154, head/etc/bluetooth/hcsecd.conf)
@@ -0,0 +1,56 @@
+# $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;
+}
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808211928.w7LJSrEo019244>