Re: Question about SMJobBless

2011-10-13 Thread Eric Gorr
If anyone is interested, this (probably) turned out to be a bug and one has been filed. rdar://10280469 The way the system currently works is that it will ask for an admin password every time regardless of whether or not the SMJobBless function needs to install the helper tool or not. The bug

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
I had a couple of followup questions concerning the approach used by SMJobBless in developing a secure helper tool. In the How It Works section in the ReadMe, it states: 4. Requiring the user to authorize the privileged helper tool only once the first time it's used This is what I believe

Re: Question about SMJobBless

2011-09-30 Thread Jean-Daniel Dupas
If you want answer, you should try the darwin-dev list. SMJobBless is not cocoa specific, and so is off-topic on this list, and IIRC, the engineer in charge of the ServiceManagement framework is a darwin-dev subscriber. Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup

Re: Question about SMJobBless

2011-09-30 Thread Jean-Daniel Dupas
Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup questions concerning the approach used by SMJobBless in developing a secure helper tool. In the How It Works section in the ReadMe, it states: 4. Requiring the user to authorize the privileged helper tool only

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
On Sep 30, 2011, at 10:34 AM, Jean-Daniel Dupas wrote: Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup questions concerning the approach used by SMJobBless in developing a secure helper tool. In the How It Works section in the ReadMe, it states: 4.

Re: Question about SMJobBless

2011-09-30 Thread Jean-Daniel Dupas
Le 30 sept. 2011 à 18:14, Eric Gorr a écrit : On Sep 30, 2011, at 10:34 AM, Jean-Daniel Dupas wrote: Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup questions concerning the approach used by SMJobBless in developing a secure helper tool. In the How It

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
On Sep 30, 2011, at 1:00 PM, Jean-Daniel Dupas wrote: Le 30 sept. 2011 à 18:14, Eric Gorr a écrit : On Sep 30, 2011, at 10:34 AM, Jean-Daniel Dupas wrote: Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup questions concerning the approach used by SMJobBless

Re: Question about SMJobBless

2011-09-30 Thread Kyle Sluder
On Sep 30, 2011, at 10:05 AM, Eric Gorr mail...@ericgorr.net wrote: On Sep 30, 2011, at 1:00 PM, Jean-Daniel Dupas wrote: As I understand it, you have to bless the job only once, not at each launch, so you shouldn't have to request the authorization each time. It would be interesting if

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
That's interesting. So, how would one go about checking to see whether or not SMJobBless needed to be called? I suppose one would need to check the version number of the installed job vs. the one in the application package. I also suppose one would also try to connect with the helper tool

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
So, it looks like one can call SMJobCopyDictionary with kSMDomainSystemLaunchd and, in the case of the SMJobBless sample code, com.apple.bsd.SMJobBlessHelper to determine whether or not the helper tool has been installed. What I am still not sure about is how to check the version number of the

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
Well, it turned out to be not that bad to check the version numbers. The trick was to use CFBundleCopyInfoDictionaryForURL so one could get the info.plist from the helper tool. In any case, for those who might be interested, I have included the code below I used to check the installed helper

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
Ok, so the code to do the code sign check I am using is below. Furthermore, I have my version of the SMJobBless app with these checks at: http://ericgorr.net/cocoadev/SMJobBless.zip The only remaining question is whether or not there is a better way or whether the code-sign check is

Question about SMJobBless

2011-09-29 Thread Eric Gorr
I cannot seem to locate any documentation on this, so hopefully someone can confirm the behavior I am seeing with Apple's sample SMJobBless code located at: http://developer.apple.com/library/mac/#samplecode/SMJobBless/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010071 I was under the