Accessing Media Databases & Sandboxing
| Originator: | peter | ||
| Number: | rdar://10962318 | Date Originated: | 01-Mar-2012 03:12 PM |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.7 |
| Classification: | Security | Reproducible: | Always |
01-Mar-2012 03:12 PM Peter Baumgartner: Our open source framework iMediaBrowser needs to be able to locate media files (of various types, images, audio, video, links, etc) on the user's file system. There are two different ways that are supported by our framework. One is to ask various databases (iPhoto, Aperture, Lightroom, iTunes, etc) for the location of media files and for metadata of these media files. In order to achieve this we need to be able to read those databases (e.g. AlbumData.xml, iTunesLibrary.xml, Lightroom.lrcat, etc): This works fine if the app is not sandboxed, but fails for various reasons once the app is sandboxed. First, depending on the location of the database file, the app may not be able to read the database file itself. And second, since the media files may be scattered across the whole file system (possible multiple mounted or unmounted disks), the app may not be able to access the media files. The entitlements to the Images, Music, and Movies folder do not suffice in this case. For the short term, an XPC service bundle that has a temporary read entitlement to the whole file system (/) will help us to do the job. In the long run it would be nice if Apple could offer an API that lets each database application register the media files (location, thumbnail, and metadata) and an API that lets client apps retrieve those registered media files. This API should be flexible enough to support various media types, and it should support all kinds of databases, not just Apple made application (I'm thinking of Adobe Lightroom here). If you supply such an API in the future, please do not revoke the temporary entitlements immediately, but give us a grace period, until all database app choose to register their media files.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!