<<if we can get the temp files to work>>

Whoops, that should obviously say "if we can't get the temp files to work".

Chris

________________________________________
From: cocoa-dev-bounces+ccianflone=makemusic....@lists.apple.com 
[cocoa-dev-bounces+ccianflone=makemusic....@lists.apple.com] on behalf of 
Cianflone, Chris [ccianfl...@makemusic.com]
Sent: Sunday, June 02, 2013 4:16 PM
To: Kyle Sluder; cocoa-dev@lists.apple.com
Subject: RE: 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 [k...@ksluder.com]
Sent: Saturday, June 01, 2013 4:04 PM
To: Cianflone, Chris; cocoa-dev@lists.apple.com
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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/ccianflone%40makemusic.com

This email sent to ccianfl...@makemusic.com



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to