First, I would try a config that we know works.  Take a look at this:
https://github.com/otcshare/automotive-message-broker/blob/0.14/plugins/dbus/amb.conf

Change the service name from "org.automotive..." to
"org.tizen.setting" and verify it still works.  Then you can add stuff
one at a time and test to see what causes the failure.

cheers,
Kevron

On Thu, Feb 5, 2015 at 3:06 AM, 王 <ww20084600...@163.com> wrote:
> I am running code as "root",but it can not be get a dbus name.What can I do?
>
>
>
>
>
>
>
> At 2015-01-28 07:30:00, "Rees, Kevron" <kevron.m.r...@intel.com> wrote:
>>On Mon, Jan 26, 2015 at 5:39 PM, 王 <ww20084600...@163.com> wrote:
>>> I am using gio and DBUS implementation to create a daemon process. I'm
>>> using
>>> g_bus_own_name() to acquire the name, and my error case respond the the
>>> busAcquiredCb then nameLostCb scenario.  Here is my code.
>>> mNameRequestId = g_bus_own_name(G_BUS_TYPE_SYSTEM, //bus type
>>> "org.tizen.setting", //bus name
>>> G_BUS_NAME_OWNER_FLAGS_NONE, //flags
>>> busAcquiredCb, //bus acquired callback
>>> nameAcquiredCb,//name acquired callback
>>> nameLostCb,//name lost callback
>>> NULL,
>>> NULL);
>>> I'm sure "orr.tizen.setting" is the unique name.
>>> I have tried the method in method.This is setting.conf in
>>> /etc/dbus-1/systemd/
>>> <!DOCTYPE busconfig PUBLIC
>>>  "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
>>>  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd";>
>>> <busconfig>
>>>         <policy user="root">
>>>                 <allow own="org.tizen.setting"/>
>>>                 <allow send_destination="org.tizen.setting"/>
>>>         </policy>
>>
>>This makes it so only user "root" can own.  Are you running your code
>>as "root"?  This is also not very safe security-wise.
>>
>>>         <policy at_console="true">
>>>                 <deny own="org.tizen.setting"/>
>>>                 <allow send_destination="org.tizen.setting"/>
>>>         </policy>
>>>         <policy context="default">
>>
>>I would allow own="*" here and add user="foo" to this as well.
>>
>>>                 <deny own="org.tizen.setting"/>
>>>                 <allow send_destination="org.tizen.setting"/>
>>>         </policy>
>>> </busconfig>
>>> how can I get more information about the error?
>>>
>>
>>
>>
>>>
>>>
>>> _______________________________________________
>>> IVI mailing list
>>> IVI@lists.tizen.org
>>> https://lists.tizen.org/listinfo/ivi
>>>
>
>
>
_______________________________________________
IVI mailing list
IVI@lists.tizen.org
https://lists.tizen.org/listinfo/ivi

Reply via email to