Security: Context filtering in dLeyna
by Ludovic Ferrandis
Following email about context filtering in GUPnP, see message
<https://mail.gnome.org/archives/gupnp-list/2013-June/msg00011.html>
What would be the impacts on dLeyna?
There will be more development for this component.
First, there will be a white list by servers using GUPnP, that means one
for dleyna-server and one for dleyna-renderer.
That implies all applications using the same dLeyna component (server or
renderer) will share the same white list.
We need to provide APIs, so applications could manage their own white list.
We need also to provide a signal, so applications using the same dLeyna
component, will be warned when another application is making change to
the white list.
How to manage the white list?
dLeyna won't store any white list. It will just provide APIs, so
applications are going to be able to manage their own white list.
dLeyna won't provide a default white list, nor store a default white
list in its preferences.
dLeyna dbus API:
interface: com.intel.dLeynaServer.Manager
Methods:
WhiteListEnable(b enable) -> void
WhiteListAddInterface(s interface) -> b
WhiteListRemoveInterface(s interface) -> b
WhiteListGetInterface() -> as
WhiteListResetInterface() -> void
s interface: a semi colon separated string list
Signal:
WhiteListChanged(s)
Return the list of interface currently in the white list.
interface: a semi colon separated string list
Property:
WhiteListEnabled -> b (read only)
Any comments are welcome.
Thanks,
Ludovic
--
Ludovic Ferrandis
Open Source Technology Center
Intel Corporation
7 years, 7 months
Question regards dleyna-server/test/dbus/dms-info.c
by Guanhua Wang
Dear All,
Hey everyone, I have some questions regarding the dms-info.c file.
As for this function:
static void prv_get_container_props(dms_info_t *info, const gchar
*container)
{
dms_server_data_t *data;
GDBusProxy *proxy;
GDBusProxyFlags flags;
if (!g_hash_table_lookup_extended(info->dmss, container, NULL, NULL)) {
printf("Container Object Found: %s\n", container);
/* We'll create these proxies synchronously. The server
is already started and we don't want to retrieve any
properties so it should be fast. Okay, we do want
to retrieve properties but we want to do so for all
interfaces and not just org.gnome.UPnP.MediaContainer2.
To do this we will need to call GetAll("").
*/
flags = G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES;
proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION,
flags, NULL,
DMS_INFO_SERVICE,
container,
DMS_INFO_PROPERTIES_IF,
NULL, NULL);
if (!proxy) {
printf("Unable to create Container Proxy for %s\n",
container);
} else {
data = prv_dms_server_data_new(proxy);
g_hash_table_insert(info->dmss, g_strdup(container),
data);
++info->async;
g_dbus_proxy_call(proxy, DMS_INFO_GET_ALL,
g_variant_new("(s)", ""),
G_DBUS_CALL_FLAGS_NONE, -1,
data->cancellable,
prv_get_props_cb,
info);
}
}
}
I want to make some change to this function in order to realize the search
function to retrieve the media files, the changing I've made are:
1 DMS_INFO_PROPERTIES_IF ------> org.gnome.UPnP.MediaContainer2
2 DMS_INFO_GET_ALL ---------> SearchObjectsEx
3 g_variant_new("(s)", ""), -----------> g_variant_new("(s)", "Type
derivedfrom \"*\"", 0, 10, "[\"DisplayName\"]", "-DisplayName"),
After I made these changes, within "prv_get_props_cb" call back function,
as for the function:
variant = g_dbus_proxy_call_finish(info->manager_proxy, res,
NULL);
"variant" always gives a "NULL" feedback.
There must be something wrong for what I did, could you give me some advice
about how to do this?
Thank you so much.
Regards!
Guanhua
7 years, 7 months