Return-Path: From: To: , CC: , , , , Date: Tue, 7 Sep 2010 11:57:38 +0300 Subject: RE: [PATCH] BT_SECURITY_HIGH requires 16 digit pin code Message-ID: <99B09243E1A5DA4898CDD8B7001114480979581277@EXMB04.eu.tieto.com> References: <1282909526-19374-1-git-send-email-waldemar.rymarkiewicz@tieto.com> <1282911133.835.30.camel@localhost.localdomain> <99B09243E1A5DA4898CDD8B7001114480976E15A2C@EXMB04.eu.tieto.com> <20100827124524.GA9484@jh-x301> <99B09243E1A5DA4898CDD8B7001114480979219655@EXMB04.eu.tieto.com> <20100902135108.GA30759@jh-x301> In-Reply-To: <20100902135108.GA30759@jh-x301> Content-Type: multipart/mixed; boundary="_002_99B09243E1A5DA4898CDD8B7001114480979581277EXMB04eutieto_" MIME-Version: 1.0 List-ID: --_002_99B09243E1A5DA4898CDD8B7001114480979581277EXMB04eutieto_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Johan, >-----Original Message----- >From: Johan Hedberg [mailto:johan.hedberg@gmail.com]=20 >Sent: Thursday, September 02, 2010 3:51 PM >> I attached slightly updated patches. >Thanks. However, the kernel patch and new ioctl will need=20 >comments at least from Marcel. Once we add an ioctl we're=20 >stuck with it for quite some time and have to maintain it, no=20 >matter what kind of newer/better kernel-userspace interfaces=20 >we come up with. So the choice of accepting a new ioctl isn't so easy. Then, wait for Marcel's comment. >One thing that you'd definitely need to fix in your patches is=20 >to keep at least the same level of support that the current=20 >BlueZ has with kernels that don't have the new ioctl. Right=20 >now your patch would make legacy pairing fail in such cases=20 >which is not acceptable. Only with a major version change=20 >(5.x) would it be possible to consider requiring a newer=20 >kernel version in order to have essential functionality in place. I updated the bluez patch. Now paring will not fail due to not compatible = kernel api. Regards, /Waldek= --_002_99B09243E1A5DA4898CDD8B7001114480979581277EXMB04eutieto_ Content-Type: application/octet-stream; name="0001-BT_SECURITY_HIGH-requires-16-digit-pin-code.patch" Content-Description: 0001-BT_SECURITY_HIGH-requires-16-digit-pin-code.patch Content-Disposition: attachment; filename="0001-BT_SECURITY_HIGH-requires-16-digit-pin-code.patch"; size=6664; creation-date="Tue, 07 Sep 2010 11:49:39 GMT"; modification-date="Tue, 07 Sep 2010 11:49:39 GMT" Content-Transfer-Encoding: base64 RnJvbSAyNDMzOTAzMDIzZjZlOTljYzViMWQ4MDBmNzFhNzQzMTA0OGEyM2VlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBXYWxkZW1hciBSeW1hcmtpZXdpY3ogPHdhbGRlbWFyLnJ5bWFy a2lld2ljekB0aWV0by5jb20+CkRhdGU6IE1vbiwgMjEgSnVuIDIwMTAgMTg6NTM6NTEgKzAyMDAK U3ViamVjdDogW1BBVENIXSBCVF9TRUNVUklUWV9ISUdIIHJlcXVpcmVzIDE2IGRpZ2l0IHBpbiBj b2RlCgpUaGUgc2VjdXJpdHkgbGV2ZWwgQlRfU0VDVVJJVFlfSElHSCBleHBlY3RzIHNlY3VyZSBj b25uZWN0aW9uCmFuZCBhIG1pbmltdW0gMTYgZGlnaXQgcGluIGNvZGUgdXNlZCBmb3IgYm9uZGlu Zy4gSXQncyByZXF1aXJlZCBieSB0aGUKU2ltIEFjY2VzcyBQcm9maWxlLgoKUGF0Y2ggb24gYmVo YWxmIG9mIFNULUVyaWNzc29uIFNBLgotLS0KIGxpYi9oY2kuaCAgICAgIHwgICAgOCArKysrKysr LQogc3JjL2RidXMtaGNpLmMgfCAgIDM4ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr Ky0tLS0tCiBzcmMvc2VjdXJpdHkuYyB8ICAgNTQgKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrKy0tLS0tLS0tCiAzIGZpbGVzIGNoYW5nZWQsIDg2IGluc2VydGlv bnMoKyksIDE0IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpYi9oY2kuaCBiL2xpYi9oY2ku aAppbmRleCA1MTJkYWI5Li5hMzEzOTI5IDE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b2YocGluKSk7CiAJ cGlubGVuID0gcmVhZF9waW5fY29kZShzYmEsIGRiYSwgcGluKTsKIAogCWlmIChwaW5sZW4gPiAw KSB7CisJCWlmIChhci5sZXZlbCA9PSBCVF9TRUNVUklUWV9ISUdIICYmIHBpbmxlbiA8IDE2KSB7 CisJCQllcnJvcigiTm90IDE2IGRpZ2l0IHBpbiBjb2RlLiIpOworCQkJZ290byByZWplY3Q7CisJ CX0KIAkJc2V0X3Bpbl9sZW5ndGgoc2JhLCBwaW5sZW4pOwogCQltZW1jcHkocHIucGluX2NvZGUs IHBpbiwgcGlubGVuKTsKIAkJcHIucGluX2xlbiA9IHBpbmxlbjsKLS0gCjEuNy4wLjQKCg== --_002_99B09243E1A5DA4898CDD8B7001114480979581277EXMB04eutieto_--