• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MDSchemaCopyAllAttributes() returning nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MDSchemaCopyAllAttributes() returning nil


  • Subject: Re: MDSchemaCopyAllAttributes() returning nil
  • From: Dave DeLong <email@hidden>
  • Date: Thu, 18 Jun 2009 12:04:34 -0600

This is the root tool that powers the Mozy backup product. One of the features is that users can specify queries to determine which files to back up. However, it needs to find all files across the system, and not just the users files. Hence, our backup utility has to run as root. Part of our query stuff needs to have access to the list of spotlight attributes for optimization reasons.

So, how can a root program get a complete list of Spotlight attributes? (Either via a function or getting a list for each user and combining them, etc)

Thanks,

Dave

On Jun 18, 2009, at 11:58 AM, Kyle Sluder wrote:

On Thu, Jun 18, 2009 at 10:03 AM, Dave DeLong<email@hidden> wrote:
This application *is* the privileged helper process, and it needs to know about all the Spotlight attributes that spotlight has. The problem is that Spotlight doesn't seem to like the root user.

Why is the privileged process asking Spotlight for anything? Try to factor as much code as possible out of your privileged tool.

In this particular instance, don't forget that Spotlight importers can
live in ~/Library/Spotlight as well as within app bundles in
~/Applications.  Any answer that MDSchemaCopyAllAttributes() would
give you when running as root might be incorrect for the user who's
actually the results.

--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


  • Follow-Ups:
    • Re: MDSchemaCopyAllAttributes() returning nil
      • From: Kyle Sluder <email@hidden>
    • Re: MDSchemaCopyAllAttributes() returning nil
      • From: Benjamin Stiglitz <email@hidden>
References: 
 >MDSchemaCopyAllAttributes() returning nil (From: Dave DeLong <email@hidden>)
 >Re: MDSchemaCopyAllAttributes() returning nil (From: Benjamin Stiglitz <email@hidden>)
 >Re: MDSchemaCopyAllAttributes() returning nil (From: Dave DeLong <email@hidden>)
 >Re: MDSchemaCopyAllAttributes() returning nil (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Group CGAffineTransform Animations?
  • Next by Date: Re: Group CGAffineTransform Animations?
  • Previous by thread: Re: MDSchemaCopyAllAttributes() returning nil
  • Next by thread: Re: MDSchemaCopyAllAttributes() returning nil
  • Index(es):
    • Date
    • Thread