From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] hcid D-Bus patch
Date: Fri, 30 Sep 2005 10:37:40 +0200 [thread overview]
Message-ID: <1128069460.4955.25.camel@localhost.localdomain> (raw)
In-Reply-To: <e1effdeb050929122670827a96@mail.gmail.com>
Hi Claudio,
> I don't want define a group domain for evey group of access. I think
> you didn't understand my idea. I defined fixed interfaces
> (org.bluez.manager or org.bluez.devices) and path names based on
> device identification.
this might be true, because I am a total newbie when it comes to D-Bus
security. I have to rely on other peoples investigation here.
> In the security policy file we can define rules according with our
> need. We can define rules based on paths, interfaces, users,
> group ... or a combination of these parameters. At first phase of
> bluetoothd development we need only define clear interfaces and path
> to make possible define security policy easily in the future. We don't
> need thinking on define a group domain or rules at this momment.
>
> The interfaces name will be shared by method call, method reply,
> errors and signals. Remember that one path, can have a lot of
> interfaces. Interfaces is just a way to group a set of
> methods(services). Therefore, if you apply one rule for a path, this
> rule will be applied for all interfaces that belongs to this path.
This means we will have a generell restricted policy and we create some
holes to make specific calls available for normal users.
> Regarding the device identification in the path name, I prefer use
> hci(for default kernel device), hci1, hci2, ... It's easier use the
> device id of "evt_si_device" event. You suggested use the bluetooth
> address, for this approach we can define a the default
> device(000000000000), and use the string representation of bdaddr_t
> for the others devices. eg:"A089BE880D00", "E4A500461300" The final
> decision is yours.
I will go with "default", because at some point I might make the HCI
device identifier strings changeable, like we can do for Ethernet. The
BDADDR_ANY is not needed, but we can do this. However this means that I
have to implement a possibility to define a default device inside the
kernel. Otherwise BDADDR_ANY in D-Bus and inside the kernel might end up
in two different devices. For the address representation I will use the
string representation "00:11:22:33:44:55", because this is how normal
users will see the address and there is no need to obfuscate the address
for it.
> I checked the libhal code, a similar approach is implemented. See how
> the messages are created. The first argument of the
> dbus_message_new_method_call function is the service bus name, the
> second is the path, the third is the interface and
> the last one is the member name(service). "udi" means unique device
> identification.
>
> LIBHAL side(client):
>
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
> udi,
>
> "org.freedesktop.Hal.Device",
> "GetAllProperties");
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
>
> "/org/freedesktop/Hal/Manager",
>
> "org.freedesktop.Hal.Manager",
> "GetAllDevices");
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
> udi,
>
> "org.freedesktop.Hal.Device",
> "GetPropertyType");
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
> udi,
>
> "org.freedesktop.Hal.Device",
>
> "GetPropertyStringList");
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
> udi,
>
> "org.freedesktop.Hal.Device",
> "GetPropertyInteger");
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
> udi,
>
> "org.freedesktop.Hal.Device",
> "GetPropertyInteger");
> message = dbus_message_new_method_call ("org.freedesktop.Hal",
> udi,
>
> "org.freedesktop.Hal.Device",
> "GetPropertyDouble");
> In the server side - hald(daemon)
> DBusHandlerResult
> device_get_property (DBusConnection * connection, DBusMessage *
> message){
> ...
> udi = dbus_message_get_path (message);
> ..
> }
>
> Basically, HAL has two interfaces, one for devices and another for the
> manager. Each device has path registered in the system Bus, where the
> device identification belongs to the path.
>
> After this analysis I think we are following the right path.
I think so, too. Please send in a new patch. We need something to get
started and as you, I like it step by step.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-09-30 8:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-16 14:42 [Bluez-devel] hcid D-Bus patch Claudio Takahasi
2005-09-19 14:31 ` [Bluez-devel] Re: hcid D-Bus patch (RSSI question) Claudio Takahasi
2005-09-20 11:39 ` Marcel Holtmann
2005-09-21 8:51 ` [Bluez-devel] hcid D-Bus patch Marcel Holtmann
2005-09-21 12:49 ` Claudio Takahasi
2005-09-21 13:19 ` P. Durante
2005-09-21 13:52 ` Claudio Takahasi
2005-09-22 14:13 ` Marcel Holtmann
2005-09-22 17:12 ` Claudio Takahasi
2005-09-22 14:17 ` Marcel Holtmann
2005-09-22 16:51 ` Claudio Takahasi
2005-09-22 17:54 ` Marcel Holtmann
2005-09-23 14:28 ` Claudio Takahasi
2005-09-23 17:15 ` Claudio Takahasi
2005-09-25 10:33 ` Marcel Holtmann
2005-09-26 11:59 ` Claudio Takahasi
2005-09-28 8:45 ` Marcel Holtmann
2005-09-28 9:08 ` [Bluez-devel] help: HIDD and HID2HCI Charles Majola
2005-09-28 19:19 ` [Bluez-devel] hcid D-Bus patch Claudio Takahasi
2005-09-28 19:53 ` Eduardo Rocha
2005-09-29 16:25 ` Marcel Holtmann
2005-09-29 19:26 ` Claudio Takahasi
2005-09-30 8:37 ` Marcel Holtmann [this message]
2005-09-30 14:52 ` Claudio Takahasi
2005-09-30 15:03 ` Marcel Holtmann
2005-10-02 11:52 ` P. Durante
2005-10-03 13:57 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1128069460.4955.25.camel@localhost.localdomain \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).