Skip to main content

java.security.AccessControlException

5 replies [Last post]
tsui
Offline
Joined: 2008-02-05
Points: 0

Hi folks,

I still keep on getting AccessControlExceptions while trying to write to ADA.
The thing is, it works (although i can catch exceptions) in PowerDVD / WinDVD and on PS3 and Philips Blu-Ray-Player - whereas Sony's Blu-Ray-Players won't write anything to ADA.

So I got my FileManager class where i create a new FilePermissionsObject

myFilePermission = new FilePermission(directory, "read,write,delete");

directory is the path i got through the System and Xlet properties divided by file.separator. Everything looks fine, but when I check the permissions by

AccessController.checkPermission(myFilePermission);

I get the following Exceptions: (OrgID and AppID renamed here in forum!)

Security Manager : com.cl.bdj.jar.BDJSecurityManager@f93424
java.security.AccessControlException: access denied (java.io.FilePermission /APDA/orgID/appID/ read,write,delete)
FileManager: Access Context: java.security.AccessControlContext@41833f

org.dvb.io.persistent FileAccessPermission are alle set to true!

Any ideas why that permission-stuff ain't working! How to get rid of the AccessControl Exceptions and write to ADA safely? Is the BDJSecurityManager different?

Thanks a lot guys!

All the best,
Jochen

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tsui
Offline
Joined: 2008-02-05
Points: 0

Hey Joe,

you were right - i had to add a file credential (as covered by MHP doc) to the PRF File and properly sign the Permission-File, as well.
So now the Security Exception is gone - thanks a lot.

Jochen

chihiro_saito
Offline
Joined: 2006-11-08
Points: 0

Hi Jochen,

As far as I remember, ADA (/"dvd.persistant.root" property value/orgID/appID/) should be read-able and write-able even to a non-signed application. If you're getting access denied, one area I'd check is whether your app is using the consistant orgID and appID across various places in the disc structure. The orgID goes into BDJO, in id.bdmv, in PRF, gets appended to the Org section of the application certificate used to sign the jar, to name a few.

Best,
Chihiro

Joe Rice

I think that MHP 12.6.2.7 covers access to the ADA (referred to by BD-
ROM Part 3-2 12.2.2). If I understand correctly, it seems to say that
access for read or write is only granted to signed apps with
appropriate PRFs, with no access otherwise. I wonder if the PRF is the
issue here?

Joe

On Apr 17, 2008, at 9:41 AM, bd-j-dev@mobileandembedded.org wrote:

> Hi Jochen,
>
> As far as I remember, ADA (/"dvd.persistant.root" property value/
> orgID/appID/) should be read-able and write-able even to a non-
> signed application. If you're getting access denied, one area I'd
> check is whether your app is using the consistant orgID and appID
> across various places in the disc structure. The orgID goes into
> BDJO, in id.bdmv, in PRF, gets appended to the Org section of the
> application certificate used to sign the jar, to name a few.
>
> Best,
> Chihiro
> [Message sent by forum member 'chihiro_saito' (chihiro_saito)]
>
> http://forums.java.net/jive/thread.jspa?messageID=269799
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

chihiro_saito
Offline
Joined: 2006-11-08
Points: 0

> I think that MHP 12.6.2.7 covers access to the ADA (referred to by BD-
ROM Part 3-2 12.2.2).

Ah, thanks for the clarification! It looks like I was hitting an impl bug back then, in this case.

Best,
Chihiro

tsui
Offline
Joined: 2008-02-05
Points: 0

Thanks for your efforts!

@Chihiro: I double checked my OrgID and AppID - they are all correctly set.

@Joe: This is a good start since I have just been using kind of a standard PRF. I'm gonna have a deeper look at the MHP-docs now and see if I can make it work.
Get back to you later.

Thanks a lot!
Jochen

Message was edited by: tsui