-
Notifications
You must be signed in to change notification settings - Fork 7
ayatana-indicator-bluetooth: Add Bluetooth pairing agent #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Robert Tari <[email protected]> Signed-off-by: Muhammad Asif <[email protected]>
Signed-off-by: Muhammad Asif <[email protected]>
* Passkey/PIN display is slightly wonky right now, BlueZ doesn't call the Cancel() method once pairing is done, so you have to swipe away the notification manually. But apart from that, everything else works. Signed-off-by: Muhammad <[email protected]>
|
|
||
| public void RequestConfirmation (GLib.ObjectPath object, uint32 passkey) throws RejectedError, GLib.DBusError, GLib.IOError | ||
| { | ||
| string body = "Are you sure you want to pair with passkey %06u?".printf (passkey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid confusion with web passkeys, I think we should call both options "PIN" given that's how it's generally referred to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, will do that.
| } | ||
|
|
||
| if (have_actions) { | ||
| loop.run (); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too familiar with vala, won't this block? This could quickly turn into an unintended DoS - imo we should make sure this can concurrently process/reject other requests to avoid that
| public void AuthorizeService (GLib.ObjectPath object, string uuid) throws GLib.DBusError, GLib.IOError | ||
| { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it is, the (background) agent will now authorize any connection request from the other device, negating Bluez' "trusted" flag ("Connect automatically when detected" in lomiri-system-settings). Is that intended?
No description provided.