Re: [PATCH BlueZ 2/2] transport: Allow to set A2DP transport delay property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +static void set_delay_report(const GDBusPropertyTable *property,
> > +                               DBusMessageIter *iter, GDBusPendingPropertySet id,
> > +                               void *data)
> > +{
> > +       struct media_transport *transport = data;
> > +       uint16_t arg;
> > +       int err;
>
> This really needs to check that sender is the owner of the transport.

The problem is that currently there is no mechanism which will allow
to get the sender name in the property get/set callback (at least I
couldn't find any). The statement "this property is only writable when
the transport was acquired by the sender" is also for the Volume
property, but as for Delay (which currently lacks the setter) it's not
implemented. So, now the question is whether you would like to fix
that as well (or amend the doc)? Some users might say that allowing
others to control volume might be a feature. For the Delay I'm not
sure... Probably you are right that the Delay is more intrinsic to the
transport, and external manipulation would not be desired.

As for the design of this authorization check I can see two possibilities:

1. Pass `message` to the `property->set()` in the
"dbus/objects.c:properties_set()". But this will require updates in
all setters (and maybe for symmetry the getter should also receive the
original message?).
2. Add a dedicated callback for setter/getter authorization, in a
similar way the `exists()` works.

In either way I think that this should be a separate patch, applied
either before or after the Delay work.

Regards,
Arek




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux