Message ID | 20250321200527.1733821-1-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [BlueZ,v1] device: Attempt to elevate security on Pair while connected | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=946413 ---Test result--- Test Summary: CheckPatch PENDING 0.22 seconds GitLint PENDING 0.27 seconds BuildEll PASS 20.44 seconds BluezMake PASS 1558.49 seconds MakeCheck PASS 13.42 seconds MakeDistcheck PASS 159.45 seconds CheckValgrind PASS 215.37 seconds CheckSmatch PASS 284.29 seconds bluezmakeextell PASS 98.23 seconds IncrementalBuild PENDING 0.30 seconds ScanBuild PASS 868.20 seconds Details ############################## Test: CheckPatch - PENDING Desc: Run checkpatch.pl script Output: ############################## Test: GitLint - PENDING Desc: Run gitlint Output: ############################## Test: IncrementalBuild - PENDING Desc: Incremental build with the patches in the series Output: --- Regards, Linux Bluetooth
diff --git a/src/device.c b/src/device.c index 57577e57920a..a04eebe1dff6 100644 --- a/src/device.c +++ b/src/device.c @@ -3185,10 +3185,13 @@ static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg, if (!state->connected && btd_le_connect_before_pairing()) err = device_connect_le(device); - else + else if (!state->connected || !bt_att_set_security(device->att, + BT_ATT_SECURITY_MEDIUM)) err = adapter_create_bonding(adapter, &device->bdaddr, device->bdaddr_type, io_cap); + else + err = 0; } else { err = adapter_create_bonding(adapter, &device->bdaddr, BDADDR_BREDR, io_cap);
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This would make Pair act behave the same as when the device reconnect and bonding already exists. Fixes: https://github.com/bluez/bluez/issues/1125 --- src/device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)