public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] patched script
@ 2004-04-14 22:02 Michal Semler (volny.cz)
  2004-04-17  0:01 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Semler (volny.cz) @ 2004-04-14 22:02 UTC (permalink / raw)
  To: bluez-users

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Hi Marcel,

sending patched script bluetooth for debian

1]added bthid daemon to start/stop sections
2]fixes variables to prevent atacker pass some extended values into them

Hope you`ll include it

Michal

[-- Attachment #2: bluetooth.rc.deb.new --]
[-- Type: text/x-diff, Size: 2314 bytes --]

--- /usr/src/bluez-utils-2.6/scripts/bluetooth.rc.deb	Fri Apr  2 03:21:04 2004
+++ bluetooth	Wed Apr 14 23:56:17 2004
@@ -11,6 +11,7 @@
 HCIATTACH=/usr/sbin/hciattach
 UART_CONF=/etc/bluetooth/uart
 SDPD=/usr/sbin/sdpd
+BTHID=/opt/bluetooth/sbin/bthid
 RFCOMM=/usr/bin/rfcomm
 RFCOMM_CONF=/etc/bluetooth/rfcomm.conf
 
@@ -18,30 +19,35 @@
 
 start_uarts() 
 {
-	[ -x $HCIATTACH -a -f $UART_CONF ] || return
-	grep -v '^#' $UART_CONF | while read i; do
-		$HCIATTACH $i
+	[ -x "$HCIATTACH" -a -f "$UART_CONF" ] || return
+	grep -v '^#' "$UART_CONF" | while read i; do
+		"$HCIATTACH" "$i"
 	done
 }
 
 stop_uarts()
 {
-	killall $HCIATTACH > /dev/null 2>&1 || true
+	killall "$HCIATTACH" > /dev/null 2>&1 || true
 }
 
 case "$1" in
   start)
 	echo -n "Starting $DESC:"
-	if [ -x $HCID -a -f $HCID_CONF ] ; then
-		$HCID -f $HCID_CONF
+	if [ -x "$HCID" -a -f "$HCID_CONF" ] ; then
+		"$HCID" -f "$HCID_CONF"
 		echo -n " hcid"
 	fi
-	if [ -x $SDPD ] ; then
-		$SDPD
+	if [ -x "$SDPD" ] ; then
+		"$SDPD"
 		echo -n " sdpd"
 	fi
-	if [ -x $RFCOMM -a -f $RFCOMM_CONF ] ; then
-		$RFCOMM -f $RFCOMM_CONF bind all
+        if [ -x "$BTHID" ] ; then
+		"$BTHID" -d
+		echo -n " bthid"
+	fi
+
+	if [ -x "$RFCOMM" -a -f "$RFCOMM_CONF" ] ; then
+		"$RFCOMM" -f "$RFCOMM_CONF" bind all
 		echo -n " rfcomm"
 	fi
 	echo "."
@@ -49,30 +55,32 @@
 	;;
   stop)
 	echo -n "Stopping $DESC:"
-	if [ -x $RFCOMM ] ; then
+	if [ -x "$RFCOMM" ] ; then
 		echo -n " rfcomm"
-		$RFCOMM release all
+		"$RFCOMM" release all
 	fi
 	echo -n " sdpd"
-	killall $SDPD > /dev/null 2>&1 || true
+	killall "$SDPD" > /dev/null 2>&1 || true
 	echo -n " hcid"
-	killall $HCID > /dev/null 2>&1 || true
+	killall "$HCID" > /dev/null 2>&1 || true
+	echo -n " bthid"
+	killall "$BTHID" > /dev/null 2>&1 || true
 	echo "."
 	stop_uarts
 	;;
   restart|force-reload)
 	echo -n "Restarting $DESC:"
 	echo -n " hcid"
-	killall $HCID > /dev/null 2>&1 || true
+	killall "$HCID" > /dev/null 2>&1 || true
 	sleep 1
-	if [ -x $HCID -a -f $HCID_CONF ] ; then
-		$HCID -f $HCID_CONF
+	if [ -x "$HCID" -a -f "$HCID_CONF" ] ; then
+		"$HCID" -f "$HCID_CONF"
 	fi
 	echo -n " sdpd"
-	killall $SDPD > /dev/null 2>&1 || true
+	killall "$SDPD" > /dev/null 2>&1 || true
 	sleep 1
-	if [ -x $SDPD ] ; then
-		$SDPD
+	if [ -x "$SDPD" ] ; then
+		"$SDPD"
 	fi
 	echo "."
 	;;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-17 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-14 22:02 [Bluez-users] patched script Michal Semler (volny.cz)
2004-04-17  0:01 ` Marcel Holtmann
2004-04-17 11:04   ` Michal Semler (volny.cz)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox