diff options
Diffstat (limited to 'usr.sbin/bluetooth')
| -rw-r--r-- | usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 4 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/bcmfw/bcmfw.8 | 4 | ||||
| -rwxr-xr-x | usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh | 8 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 4 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/rtlbtfw/main.c | 5 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 | 5 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf | 10 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/sdpd/server.c | 12 |
8 files changed, 21 insertions, 31 deletions
diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index beb1b102b194..9e54445a012b 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 2024 +.Dd July 15, 2025 .Dt ATH3KFW 8 .Os .Sh NAME .Nm ath3kfw -.Nd download firmware for Atheros AR3011/AR3012 Bluetooth USB devices +.Nd load firmware for Atheros AR3011/AR3012 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index 50e9739340ee..28f0cbbafe00 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -25,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 2024 +.Dd July 15, 2025 .Dt BCMFW 8 .Os .Sh NAME .Nm bcmfw -.Nd download firmware for Broadcom BCM2033 Bluetooth USB devices +.Nd load firmware for Broadcom BCM2033 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl h diff --git a/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh b/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh index 48a399a82fc7..148325fcecbc 100755 --- a/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh +++ b/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh @@ -17,7 +17,7 @@ main() { unset node device started bdaddresses retry # Only one command at the moment is scan (+ add) -[ "$#" -eq 1 -a "$1" = "scan" ] || print_syntax +[ "$1" = "scan" ] || print_syntax shift # Get command line options @@ -28,6 +28,12 @@ while getopts :d:n: arg; do ?) print_syntax;; esac done +shift "$((OPTIND-1))" + +# If there's leftover parameters, print usage +[ "$#" -eq 0 ] || print_syntax +shift + # No use running without super user rights if [ $( id -u ) -ne 0 ]; then diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 87f34435d3f4..ac32a675aa63 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2024 +.Dd July 15, 2025 .Dt IWMBTFW 8 .Os .Sh NAME .Nm iwmbtfw -.Nd download firmware for Intel Wireless AC Bluetooth USB devices +.Nd load firmware for Intel Wireless AC Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c index e87a98036265..58503b8087b5 100644 --- a/usr.sbin/bluetooth/rtlbtfw/main.c +++ b/usr.sbin/bluetooth/rtlbtfw/main.c @@ -64,9 +64,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x0bda, .product_id = 0xb00c }, { .vendor_id = 0x0bda, .product_id = 0xc822 }, - /* Realtek 8822CU Bluetooth devices */ - { .vendor_id = 0x13d3, .product_id = 0x3549 }, - /* Realtek 8851BE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3600 }, @@ -482,7 +479,7 @@ main(int argc, char *argv[]) } else r = rtlbt_parse_fwfile_v1(&fw, rom_version); if (r < 0) { - rtlbt_err("Parseing firmware file failed"); + rtlbt_err("Parsing firmware file failed"); goto shutdown; } diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 index c3c0b83d97e5..5cae9c9d288d 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 @@ -23,13 +23,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 19, 2023 +.Dd July 15, 2025 .Dt RTLBTFW 8 .Os .Sh NAME .Nm rtlbtfw -.Nd firmware download utility for Realtek 87XX/88XX chip based Bluetooth -USB devices +.Nd load firmware for Realtek 87XX/88XX Bluetooth USB devices .Sh SYNOPSIS .Nm .Fl d Ar device_name diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf index 61ae53db8f39..2ef56d2af93a 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf @@ -36,16 +36,6 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8822CU Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x13d3"; - match "product" "0x3549"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8851BE Bluetooth devices notify 100 { match "system" "USB"; diff --git a/usr.sbin/bluetooth/sdpd/server.c b/usr.sbin/bluetooth/sdpd/server.c index ab398cd9339f..05a4cb5f0236 100644 --- a/usr.sbin/bluetooth/sdpd/server.c +++ b/usr.sbin/bluetooth/sdpd/server.c @@ -345,14 +345,12 @@ server_accept_client(server_p srv, int32_t fd) return; } } else { - struct xucred cr; + uid_t uid; + gid_t gid; struct passwd *pw; /* Get peer's credentials */ - memset(&cr, 0, sizeof(cr)); - size = sizeof(cr); - - if (getsockopt(cfd, 0, LOCAL_PEERCRED, &cr, &size) < 0) { + if (getpeereid(cfd, &uid, &gid) < 0) { log_err("Could not get peer's credentials. %s (%d)", strerror(errno), errno); close(cfd); @@ -360,12 +358,12 @@ server_accept_client(server_p srv, int32_t fd) } /* Check credentials */ - pw = getpwuid(cr.cr_uid); + pw = getpwuid(uid); if (pw != NULL) priv = (strcmp(pw->pw_name, "root") == 0); else log_warning("Could not verify credentials for uid %d", - cr.cr_uid); + uid); memcpy(&srv->req_sa.l2cap_bdaddr, NG_HCI_BDADDR_ANY, sizeof(srv->req_sa.l2cap_bdaddr)); |
