RE: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
RE: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
- Subject: RE: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
- From: "Cianflone, Chris" <email@hidden>
- Date: Sun, 02 Jun 2013 21:16:29 +0000
- Thread-topic: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
<< I'm kind of
curious why your Spotlight importer needs to create temporary files at
all.
>>
I wish it weren't this way and I had already started looking at this as a backup plan if we can get the temp files to work. But it runs too deep to rid ourselves of temp files. I was almost going to say it was a legacy issue (which part of it is), but we recently added a new file format which needs to be unzipped to a temp file to continue reading the file. And old files need to go through a converter process which uses temp files.
Just to be clear too, I was running into the problem first when debugging in Xcode. Then I tried installing the plugin in /Library/Spotlight and started seeing all these problems in the console:
6/2/13 4:11:15.325 PM sandboxd[47546]: ([47726]) mdworker32(47726) deny file-write-create /private/var/folders/xh/sjj1bz211r56_tfmf5tt2025p36645/T/TemporaryItems/(A Document Being Saved By mdworker32) (import fstype:hfs fsflag:480D000 flags:240000005E diag:0 uti:com.makemusic.mus plugin:/Library/Spotlight/Finaled.mdimporter - find suspect file using: sudo mdutil -t 3889893)
Using that info, I did some more googling and it looks like we are not alone with problems like this.
Fearing we won't be able to get rid of temp files in our mdimporter, does anyone have any other suggestions other than telling our users, sorry it doesn't work under 10.8.
Thanks,
Chris
________________________________________
From: Kyle Sluder [email@hidden]
Sent: Saturday, June 01, 2013 4:04 PM
To: Cianflone, Chris; email@hidden
Subject: Re: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
On Sat, Jun 1, 2013, at 11:45 AM, Cianflone, Chris wrote:
> I get the same output for our 32-bit and 64-bit builds. Surely we must
> still be able to create temp files?
Spotlight importers run within a worker process; thus, they inherit the
sandbox of the worker process, not the sandbox of your app (which might
not even be running). Because these processes are run automatically by
the system with the permissions of the user, it makes sense to severely
restrict the worker's sandbox, or else the process can silently behave
in ways the user does not expect.
While it would probably be a good idea to file a request that Spotlight
importers be run within their owning app's sandbox container (thus
granting it access to the container's temp directory), I'm kind of
curious why your Spotlight importer needs to create temporary files at
all.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden