Critical issues in POI-App: Cynara blocks Navi-API registration to dbus

Description

Navigation (merged code of POI-App) can not be started.
The following logs are left.

>porter cynara[256]: User::App::navigation;0;http://tizen.org/privilege/internal/dbus => DENY
>porter afm-user-daemon[370]: terminate called after throwing an instance of 'DBus::Error'
>porter afm-user-daemon[370]: what(): Connection ":1.9" is not allowed to own the service "org.agl.gps

Navigation must provide the API to the application.
However, it has been blocked and can not be activated.

Environment

porter

Activity

Show:

Jose Bollo 
January 26, 2017 at 8:58 AM

if there is no feedback from (or ) I suppose that yes it is closed

Walt Miner 
January 13, 2017 at 12:25 AM

Is this issue closed for Chinook?

Jose Bollo 
December 22, 2016 at 8:58 AM

cool investigation!

When I made the patch and tested it, it was working. I coulded after installing the widget see the added permission in cynara using the command:

cyad -l MANIFESTS -A

You demonstrated that the patch is applied. If it doesn't work as expected I approve the use of cyad commands when installing for the demo.

Let that issue opened anyway because I have to work on in january.

Naoto YAMAGUCHI 
December 22, 2016 at 8:28 AM

https://gerrit.automotivelinux.org/gerrit/#/c/7731/ is included

but this message is not include in journal
" INFO("permitting %s %s", perm, rc ? "FAILED!" : "success"); "

I added a log
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c
index 9881e9c..aaf5f23 100644
— a/src/wgtpkg-install.c
+++ b/src/wgtpkg-install.c
@@ -115,7 +115,7 @@ static int set_required_permissions(struct wgt_desc_param *params, int required)
}
/* set the permission */
if (request_permission(params->name)) {
DEBUG("granted permission: %s", params>name);
+ ERROR("granted permission: %s", params->name);
} else if (optional) {
INFO("optional permission ungranted: %s", params->name);
} else {
@@ -136,8 +136,12 @@ static int check_widget(const struct wgt_desc *desc)
result = check_temporary_constraints(desc);
feature = desc->features;
while(result >= 0 && feature) {
+ NOTICE("-- INSTALLING widget name: %s\n", feature->name);
if (!strcmp(feature->name, feature_required_permissions))
+ {
result = set_required_permissions(feature->params, feature->required);
+ NOTICE("-- INSTALLING widget pass name: %s\n", feature->name);
+ }
feature = feature->next;
}
return result;
diff --git a/src/wgtpkg-permissions.c b/src/wgtpkg-permissions.c
index 8379446..5487f18 100644
— a/src/wgtpkg-permissions.c
+++ b/src/wgtpkg-permissions.c
@@ -135,7 +135,15 @@ int request_permission(const char *name)

#if defined(HACK_ALLOWING_REQUESTED_PERMISSIONS) && HACK_ALLOWING_REQUESTED_PERMISSIONS
if (!p)
+ {
p = add_permission(name);
+
+ ERROR("request_permission add(%p): %s\n", p, name);
+ }
+ else
+ {
+ ERROR("request_permission get only: %s\n", name);
+ }
#endif
if (p) {
#if defined(HACK_ALLOWING_REQUESTED_PERMISSIONS) && HACK_ALLOWING_REQUESTED_PERMISSIONS

The results are as follows:

Dec 20 05:59:16 porter systemd[1]: Started Session c2 of user root.
Dec 20 05:59:16 porter login[435]: ROOT LOGIN on '/dev/ttySC6'
Dec 20 05:59:44 porter afm-system-daemon[344]: NOTICE: – INSTALLING widget /usr/AGL/ces2017-demo/navigation.wgt to /var/lib/afm/applications – [/usr/src/debug/af-mai
Dec 20 05:59:44 porter afm-system-daemon[344]: NOTICE: – INSTALLING widget name: urn:AGL:required-permission
Dec 20 05:59:44 porter afm-system-daemon[344]: /usr/src/debug/af-main/1.0-r0/git/src/wgtpkg-install.c:139
Dec 20 05:59:44 porter afm-system-daemon[344]: ERROR: request_permission add(0x40bb0): http://tizen.org/privilege/internal/dbus
Dec 20 05:59:44 porter afm-system-daemon[344]: /usr/src/debug/af-main/1.0-r0/git/src/wgtpkg-permissions.c:141
Dec 20 05:59:44 porter afm-system-daemon[344]: ERROR: granted permission: http://tizen.org/privilege/internal/dbus [/usr/src/debug/af-main/1.0-r0/git/src/wgtpkg-instal
Dec 20 05:59:44 porter afm-system-daemon[344]: NOTICE: – INSTALLING widget pass name: urn:AGL:required-permission
Dec 20 05:59:44 porter afm-system-daemon[344]: /usr/src/debug/af-main/1.0-r0/git/src/wgtpkg-install.c:143

Jose Bollo 
December 22, 2016 at 7:44 AM

The config.xml looks good. I hope that you made the same for POI

Normally the cyad command in the installation script are not need. We have to check.

A check must be done to the version of af-main that you are running. Did you rebuilt it and integrated the patch https://gerrit.automotivelinux.org/gerrit/#/c/7731/ ?

Please confirm it and provide the journal/log of when you install the application because a message should be displayed when the permission is granted.

Fixed

Details

Assignee

Reporter

Fix versions

Labels

Components

Affects versions

Due date

Priority

Created December 19, 2016 at 7:02 AM
Updated January 30, 2017 at 4:01 PM
Resolved January 30, 2017 at 4:01 PM