Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 152670 Details for
Bug 236531
RFE: Add support for old-style pin helper. [kdebluetooth, patch included]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
old-style pin-helper patch
bluez-pin-exec-patch-r3.diff (text/plain), 2.32 KB, created by
Gilboa Davara
on 2007-04-16 07:37:14 UTC
(
hide
)
Description:
old-style pin-helper patch
Filename:
MIME Type:
Creator:
Gilboa Davara
Created:
2007-04-16 07:37:14 UTC
Size:
2.32 KB
patch
obsolete
>diff -ru bluez-utils-3.9.orig/daemon/passkey-agent.c bluez-utils-3.9/daemon/passkey-agent.c >--- bluez-utils-3.9.orig/daemon/passkey-agent.c 2007-01-25 16:09:25.000000000 +0100 >+++ bluez-utils-3.9/daemon/passkey-agent.c 2007-03-27 14:41:45.000000000 +0200 >@@ -21,6 +21,7 @@ > * > */ > >+#define DBUS_API_SUBJECT_TO_CHANGE > #ifdef HAVE_CONFIG_H > #include <config.h> > #endif >@@ -78,6 +79,13 @@ > const char *path, *address; > dbus_bool_t numeric; > >+ char *buffer; >+ FILE *pin; >+ unsigned int buflen; >+ int status; >+ char *s_passkey; >+ >+ > if (!passkey) > return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; > >@@ -95,8 +103,34 @@ > } > > printf("Passkey request for device %s\n", address); >+ buflen=strlen(passkey)+256; >+ if(buflen<=256) >+ { >+ fprintf(stderr, "Invalid pin-helper argument, aborting."); >+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; >+ } >+ buffer=malloc(buflen); >+ if(buffer==NULL) >+ { >+ fprintf(stderr, "Error allocating memory (malloc), aborting."); >+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; >+ } >+ sprintf(buffer, "%s %s %s", passkey, "in", address); >+ pin=popen(buffer, "r"); >+ wait(&status); >+ fgets(buffer, 256, pin); >+ pclose(pin); >+ if(buffer[0]!='P' || buffer[1]!='I' || buffer[2]!='N' || buffer[3]!=':' ) >+ { >+ free(buffer); >+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; >+ } >+ s_passkey=&buffer[4]; >+ if(s_passkey[strlen(s_passkey)-1]=='\n') s_passkey[strlen(s_passkey)-1]='\0'; >+ fprintf(stderr, "Found passkey: \"%s\"\n", s_passkey); > >- dbus_message_append_args(reply, DBUS_TYPE_STRING, &passkey, >+ >+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &s_passkey, > DBUS_TYPE_INVALID); > > dbus_connection_send(conn, reply, NULL); >@@ -104,7 +138,7 @@ > dbus_connection_flush(conn); > > dbus_message_unref(reply); >- >+ free(buffer); > return DBUS_HANDLER_RESULT_HANDLED; > } > >@@ -334,10 +368,10 @@ > > static void usage(void) > { >- printf("Bluetooth passkey agent ver %s\n\n", VERSION); >+ printf("Bluetooth passkey agent ver %s with \"exec\" patch from Marco Gulino (http://www.kmobiletools.org/node/228)\n\n", VERSION); > > printf("Usage:\n" >- "\tpasskey-agent [--default] [--path agent-path] <passkey> [address]\n" >+ "\tpasskey-agent [--default] [--path agent-path] <path-to-pin-helper> [address]\n" > "\n"); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236531
: 152670 |
152671