aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbus-hci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r--src/dbus-hci.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 5b0a1f96..6f9f1bc5 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -239,6 +239,10 @@ int hcid_dbus_request_pin(int dev, bdaddr_t *sba, struct hci_conn_info *ci)
return -1;
}
+ if (!adapter_pairing_initiator(adapter, sba) &&
+ !adapter_is_pairable(adapter))
+ return -EPERM;
+
ba2str(&ci->bdaddr, addr);
device = adapter_find_device(adapter, addr);
@@ -1466,6 +1470,10 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
if (get_auth_requirements(local, remote, auth) < 0)
return -1;
+ if (!adapter_pairing_initiator(adapter, remote) &&
+ !adapter_is_pairable(adapter))
+ return -EPERM;
+
ba2str(remote, addr);
/* For CreatePairedDevice use dedicated bonding */