Is SMJobBless still the correct way to do authorisation?

2017-01-09 Thread John Brownie
I'm working on an app which will be written in Swift, but which needs to use some authorisation method to allow creation and deletion of files and folders inside the /Library directory. Last time I needed this sort of ability (three years ago), I took the SMJobBless sample code, along

Re: Why doesn't SMJobBless sample work?

2016-01-11 Thread Motti Shneor
OK. My bad. The Readme had it all, and I missed it. My unconscious Classic-Mac programmer seems to filter out python scripts still… Thanks, it works now. > On 11 בינו׳ 2016, at 10:44, Motti Shneor wrote: > > Hi. Excuse this novice question (I see previous questions relating to >

Re: Why doesn't SMJobBless sample work?

2016-01-11 Thread John Brownie
On 11/01/2016 18:44, Motti Shneor wrote: Hi. Excuse this novice question (I see previous questions relating to SMJobBless that start off where I need to finish…) I need to develop an OS-X daemon (in c++) that must run privileged. I intend to deploy it embedded in a System-Preferences panel

Why doesn't SMJobBless sample work?

2016-01-11 Thread Motti Shneor
Hi. Excuse this novice question (I see previous questions relating to SMJobBless that start off where I need to finish…) I need to develop an OS-X daemon (in c++) that must run privileged. I intend to deploy it embedded in a System-Preferences panel, that will launch it using the SMJobBless

Re: Inverse of SMJobBless

2015-11-30 Thread Gerriet M. Denkmann
ful hint. But: After doing SMJobBless twice, the third time I get kSMErrorInternalFailure. Any cure for this (other than reboot)? But anyway, this reduces the number of necessary reboots to one third. Kind regards, Gerriet. > >> Le 30 nov. 2015 à 12:28, Gerriet M. Denkmann a écrit :

Inverse of SMJobBless

2015-11-30 Thread Gerriet M. Denkmann
I have a program which talks via NSXPCConnection to a privileged helper tool. It also can install the helper tool, using SMJobBless(). The problem: When I change the helper tool, the only way to get the new version running is to remove: /Library/LaunchDaemons/myHelperTool.plist

AuthorizationExecuteWithPrivileges vs SMJobBless

2012-08-09 Thread Trygve Inda
~/Library/PreferencePanes no authorization is needed. SMJobBless seems to be the more modern way to do this, but this requires that my tool be copied from my bundle to another location on the hard drive which is not what I want. Is AuthorizationExecuteWithPrivileges ok to use (since it is marked as

Re: SMJobBless

2012-04-27 Thread Uli Kusterer
On 26.04.2012, at 22:23, Zac Bowling wrote: > I don't know but it annoyed us at SeatMe. Apple stole our SM prefix for > ServiceManagement.framework in 10.6 and we banged into a few classes. There's a discussion about namespaces in progress (and a proposal up from a developer) on Apple's objc-l

Re: SMJobBless

2012-04-26 Thread Zac Bowling
here use SMJobBless to interact with the Mac OS X to > create/destroy, and load/unload launchdamons/agents? > Really looking for sample code to make sure I'm doing things > correctly...sometimes my jobs go wonky. > > Apple docs have not been updated in about 2 years t

SMJobBless

2012-04-26 Thread Jeremy Matthews
Does anyone out there use SMJobBless to interact with the Mac OS X to create/destroy, and load/unload launchdamons/agents? Really looking for sample code to make sure I'm doing things correctly...sometimes my jobs go wonky. Apple docs have not been updated in about 2 years time... T

Blessed helper (SMJobBless) Process Name?

2012-03-26 Thread Prime Coderama
I created a blessed helper and when I view it in Activity Monitor, it does not contain a "Process Name". Can somebody please refer me to the appropriate documentation as I can not find it. Thanks, Coderama ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: SMJobBless - how to start helper tool?

2012-03-18 Thread Charles Srstka
On Mar 18, 2012, at 1:42 PM, Kurt Revis wrote: > "ssd" has apparently gone missing, but BetterAuthorizationSample is still > around. A few google searches should help you find them. The “ssd” sample code is still around as well. It’s just tricky to find — and the fact that Google searching for

Re: SMJobBless - how to start helper tool?

2012-03-18 Thread Kurt Revis
On Mar 18, 2012, at 3:20 AM, Gerriet M. Denkmann wrote: > Messing around with the Apple sample project SMJobBless, I got the > SMJobBless() function to work. > I.e. my helper tool is blessed and gets copied to: > /Library/PrivilegedHelperTools/de.mdenkmann.SMJobBlessHelper . >

Re: SMJobBless - how to start helper tool?

2012-03-18 Thread Jerry Krinock
On 2012 Mar 18, at 03:20, Gerriet M. Denkmann wrote: > SMJobBless Wrong email list for SMJobBless. Use apple-c...@lists.apple.com. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

SMJobBless - how to start helper tool?

2012-03-18 Thread Gerriet M. Denkmann
Messing around with the Apple sample project SMJobBless, I got the SMJobBless() function to work. I.e. my helper tool is blessed and gets copied to: /Library/PrivilegedHelperTools/de.mdenkmann.SMJobBlessHelper . But how to start the helper tool? (Nothing shows up in Activity Monitor, nothing

SMJobBless error: kSMErrorDomainFramework error 5 - The tool at the specified path is not valid

2012-03-03 Thread Prime Coderama
I writing a PreferencePane project and created a helper tool to perform actions that required an elevated privilege. When I run my Preference Pane, I am getting this error: > System Preferences[22312:903] Bless Error: Error > Domain=kSMErrorDomainFramework Code=5 UserInfo=0x2005790e0 "The operat

SMJobBless Copy Files subpath for PrefPane projects?

2012-03-03 Thread Prime Coderama
Does anyone know the correct Subpath to use for the Build Phases of the Target application of a PrefPane project? e.g. in an Applications project, the subpath is "Contents/Library/LaunchServices" ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Running SMJobBless causes kSMErrorDomainFramework error

2012-03-03 Thread Prime Coderama
I am trying to install a helper tool via SMJobBless and it is returning this error: System Preferences[22312:903] Bless Error: Error Domain=kSMErrorDomainFramework Code=5 UserInfo=0x2005790e0 "The operation couldn’t be completed. (kSMErrorDomainFramework error 5 - The tool at the spec

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

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
tool vs. the current helper tool version for the SMJobBless sample application. If there is a better way, I would be interested. I suppose one more additional check that might need to be made is to verify that a connection to the tool can actually be made if the versions do match. It would seem

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

Re: Question about SMJobBless

2011-09-30 Thread Kyle Sluder
be interesting if that is how it actually works, but I am quite > certain it doesn't work that way. It does. SMJobBless submits a blessed plist to launchd. It does not do one-off jobs. You use once it to install a privileged launchd task that yo

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
t; 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 p

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

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

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 priv

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 follo

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 be

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 unde