From: "Michal Semler (volny.cz)" <cijoml@volny.cz>
To: bluez-users@lists.sourceforge.net
Subject: [Bluez-users] patched script
Date: Thu, 15 Apr 2004 00:02:29 +0200 [thread overview]
Message-ID: <200404150002.29515.cijoml@volny.cz> (raw)
[-- 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 "."
;;
next reply other threads:[~2004-04-14 22:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-14 22:02 Michal Semler (volny.cz) [this message]
2004-04-17 0:01 ` [Bluez-users] patched script Marcel Holtmann
2004-04-17 11:04 ` Michal Semler (volny.cz)
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=200404150002.29515.cijoml@volny.cz \
--to=cijoml@volny.cz \
--cc=bluez-users@lists.sourceforge.net \
/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