[Dev] Finished the multi-user BT phase1 source code and the related test report
Von Dentz, Luiz
luiz.von.dentz at intel.com
Thu Oct 16 14:39:23 GMT 2014
While at it you should probably document what your code is doing, what
you store in the file and how the UID is discovered. Btw you can't
trust that the application will send you the right UID, you have to
able to discover the UID yourself from the D-Bus message itself,
perhaps you can use dbus_bus_get_unix_user but it have exceptions such
'This function only works for connections that authenticated as a
UNIX user, right now that includes all bus connections, but it's very
possible to have connections with no associated UID. So check for
errors and do something sensible if they happen.'
This also leads to the conclusion that the bus daemon would probably
be a better place to have such checks since it does in fact have the
information of what user does the connection belongs to, also be sure
that dbus_bus_get_unix_user will block while resolving the UID so it
will prevent your daemon to process any message in the meantime.
On Thu, Oct 16, 2014 at 10:04 AM, Zheng, Wu <wu.zheng at intel.com> wrote:
> Hi Corentin,
> In fact, I don't use "app" user to test it.
> As what you said, I used a specific user to test it.
> Therefore, The test result matches your requirements.
> Whatever, I will try it on Tizen common again.
> Best regards
> Zheng Wu
> -----Original Message-----
> From: Corentin Lecouvey [mailto:corentin.lecouvey at open.eurogiciel.org]
> Sent: Thursday, October 16, 2014 3:56 PM
> To: Zheng, Wu; dev at lists.tizen.org
> Cc: Le Foll, Dominique; Xu, Martin; Jia, Pei P; Liu, Bingwei
> Subject: Re: Finished the multi-user BT phase1 source code and the related test report
> Hi Zheng Wu,
> I can not take much time to read and test your code but I see a problem.
> bluetooth-service daemon is still run by 'app' user which doesn't exist anymore.
> It would be preferably run by a specific user.
> For example, 'bluetooth' user exists and it is not used in Tizen3...
> Please test your code on Tizen Common.
> Best regards,
> On 10/16/2014 09:33 AM, Zheng, Wu wrote:
>> According to https://wiki.tizen.org/wiki/Multi-user_Bluetooth, the multi-user BT phase1 source code have been finished.
>> The related multi-user BT phase1 solution have been checked. (Please search the old multi-user BT phase1 solution in the mail list).
>> The related source code are in https://review.tizen.org/gerrit/#/c/28783/
>> I have tested the source code. It matches the requirements of multi-user BT phase1.
>> Please check the following BT test results.
>> a. UserA and UserB is in IVI. DeviceA is the remote BT devices.
>> 1. UserA paired with DeviceA.
>> UserA can audio connect with DeviceA.
>> UserA can hid connect with DeviceA.
>> UserA can socket connect with DeviceA.
>> UserA can send files to DeviceA.
>> 2. At the same time, userB can't audio connect with DeviceA.
>> UserB can't hid connect with DeviceA.
>> UserB can't socket connect with DeviceA.
>> UserB can't send files to DeviceA.
>> 3. UserA can unpaire with DeviceA.
>> UserB can't unpaire with DeviceA.
>> 4. After UserA unpaired with DeviceA, userB can pair with DeviceA.
>> 5. After userB pair with DeviceA, UserB can connect with DeviceA(including audio, hid, socket and so on).
>> At the same time, userA can't connect with DeviceA.
>> If there are DeviceA and DeviceB and so on, please refer to the above cases.
>> After merging the related source code, I will add the test report to the wiki.
>> Best Regards
>> Zheng Wu
> Dev mailing list
> Dev at lists.tizen.org
More information about the Dev