You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Ulf Dittmer (JIRA)" <ji...@apache.org> on 2009/11/26 12:53:39 UTC

[jira] Created: (FELIX-1900) CPA not consulted for re-installed bundle

CPA not consulted for re-installed bundle
-----------------------------------------

                 Key: FELIX-1900
                 URL: https://issues.apache.org/jira/browse/FELIX-1900
             Project: Felix
          Issue Type: Bug
          Components: Permission Admin
    Affects Versions: felix-2.0.2
            Reporter: Ulf Dittmer


If a bundle is installed at the same location under which another bundle was installed and uninstalled before, then the CPA is no longer consulted if the bundle also has PA permissions. That can lead to the new bundle not being installed if it depends on permissions granted by the CPA.

This is caused by the m_store Map in the PermissionAdminImpl still having permission information for that location; see the use of the boolean "file" in the hasPermission method. If it gets set to true due to permissions of the old (now uninstalled) bundle being cached, then the method returns false and the CPA is not consulted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1900) CPA not consulted for re-installed bundle

Posted by "Ulf Dittmer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ulf Dittmer updated FELIX-1900:
-------------------------------

    Attachment: PermissionAdminImpl.diff

This patch ensures that the CPA is consulted even if there is an entry in the PA for a particular bundle.

(The original idea of removing all permissions for a bundle once it's uninstalled would probably violate the OSGi spec - which allows permissions to be set for bundles that are not installed.)

> CPA not consulted for re-installed bundle
> -----------------------------------------
>
>                 Key: FELIX-1900
>                 URL: https://issues.apache.org/jira/browse/FELIX-1900
>             Project: Felix
>          Issue Type: Bug
>          Components: Permission Admin
>    Affects Versions: felix-2.0.2
>            Reporter: Ulf Dittmer
>         Attachments: PermissionAdminImpl.diff
>
>
> If a bundle is installed at the same location under which another bundle was installed and uninstalled before, then the CPA is no longer consulted if the bundle also has PA permissions. That can lead to the new bundle not being installed if it depends on permissions granted by the CPA.
> This is caused by the m_store Map in the PermissionAdminImpl still having permission information for that location; see the use of the boolean "file" in the hasPermission method. If it gets set to true due to permissions of the old (now uninstalled) bundle being cached, then the method returns false and the CPA is not consulted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-1900) CPA not consulted for re-installed bundle

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls resolved FELIX-1900.
-------------------------------

    Resolution: Invalid
      Assignee: Karl Pauls

I think that this is not what the spec implies. Looking at:

9.11 Relation to Permission Admin 

If the framework provides a Conditional Permission Admin service and a Permission Admin service then a bundle A will receive its permissions according to the following steps: 
1 If the Permission Admin defines the permissions for bundle A (location is set), then these permissions override any Conditional Permission Admin information. 
2 If the Conditional Permission Admin has a non-empty table, then this table is used to calculate the permissions for bundle A. 
3 If the default permissions are set in Permission Admin, then these are given to bundle A. 
4 All Permission is given to bundle A. 

In other words, if the location is set in the PA then the CPA should not be consulted which seems to be what is happening. Please reopen this issue if you disagree.

> CPA not consulted for re-installed bundle
> -----------------------------------------
>
>                 Key: FELIX-1900
>                 URL: https://issues.apache.org/jira/browse/FELIX-1900
>             Project: Felix
>          Issue Type: Bug
>          Components: Permission Admin
>    Affects Versions: felix-2.0.2
>            Reporter: Ulf Dittmer
>            Assignee: Karl Pauls
>         Attachments: PermissionAdminImpl.diff
>
>
> If a bundle is installed at the same location under which another bundle was installed and uninstalled before, then the CPA is no longer consulted if the bundle also has PA permissions. That can lead to the new bundle not being installed if it depends on permissions granted by the CPA.
> This is caused by the m_store Map in the PermissionAdminImpl still having permission information for that location; see the use of the boolean "file" in the hasPermission method. If it gets set to true due to permissions of the old (now uninstalled) bundle being cached, then the method returns false and the CPA is not consulted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1900) CPA not consulted for re-installed bundle

Posted by "Ulf Dittmer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783592#action_12783592 ] 

Ulf Dittmer commented on FELIX-1900:
------------------------------------

I take your point. So, effectively, only one of PA or CPA can be used for any given bundle, but not both - less useful than I had hoped for, but apparently what the spec prescribes.

> CPA not consulted for re-installed bundle
> -----------------------------------------
>
>                 Key: FELIX-1900
>                 URL: https://issues.apache.org/jira/browse/FELIX-1900
>             Project: Felix
>          Issue Type: Bug
>          Components: Permission Admin
>    Affects Versions: felix-2.0.2
>            Reporter: Ulf Dittmer
>            Assignee: Karl Pauls
>         Attachments: PermissionAdminImpl.diff
>
>
> If a bundle is installed at the same location under which another bundle was installed and uninstalled before, then the CPA is no longer consulted if the bundle also has PA permissions. That can lead to the new bundle not being installed if it depends on permissions granted by the CPA.
> This is caused by the m_store Map in the PermissionAdminImpl still having permission information for that location; see the use of the boolean "file" in the hasPermission method. If it gets set to true due to permissions of the old (now uninstalled) bundle being cached, then the method returns false and the CPA is not consulted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.