Question

I have developed a Mac software (using DiscRecordingFramework and IOKit) that creates hybrid Video-DVD. The resulting DVD is fully compatible with Video-DVD specifications. The hybrid disc hosts HFS+, UDF and ISO filesystems. Now the problem is Mac system automatically mounts HFS+ filesystem but default DVD Player on Mac cannot play a CSS protected movie from HFS+ filesystem. As a workaround I developed a script which mounts UDF filesystem along with HFS+ filesystem. This script actually load UDF2.1 kernel extension and mounts UDF filesystem. This solution worked but it's not desirable as it requires root passwords.

Is it possible to develop a solution which auto detects the hybrid disc and mounts both HFS+ and UDF filesystems? This solution should not compromise the system security. If it requires root passwords once in a lifetime that is OK but if it requires root passwords every time disc is used is not desirable.

Any help would be highly appreciated.

Était-ce utile?

La solution

Summary of the comment thread:

  • diskutil mount doesn't require root permissions, so it's preferable to use that if possible
  • The Disk Arbitration framework can be used to prevent filesystems being mounted, if necessary.
  • If you need to repeatedly perform an action as root and don't want to keep asking for the password, you can put the commands in a script, mark it as owned by root and set the setuid bit. You'll only need root permissions once for this.
  • For serious filesystem and disk trickery, you sometimes can't avoid dropping to the kernel level. An advantage of an installed kext is that it's the earliest possible way to respond to an inserted disk.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top