Hola Quinn,
Thanks for the terrific reply.
It’s hard to say without more context. Most notably, why are you escalating privileges in the first place?
One of the many things App Wrapper does as part of it's process is to ensure correct permissions on the files within the application bundle, but it fails when the customer doesn't have permission to alter to the permissions of a file.
Another task it does it does is to strip ACLs and Xattrs, sometimes customers have screwed up ACLs that prevent the ACLs from being removed, and/or prevent xattrs from being removed.
In this case, these actions can be done via API or via system commandline tools.
No. The point of SMJobBless is that you can avoid the installer package.
If you already have an installer package in play, there’s no need for SMJobBless. The package can install a launchd daemon directly.
That's good to know, as I don't use an installer package for my apps, and it means I misunderstood some aspects.
That depends on how you look at it. The problem with AEWP is that there’s no secure link between the code asking to elevate privileges and the code that’s run with elevated privileges. SMJobBless fixes that.
I kinda guessed that when I saw how complicated it was to interact with the helper, v.s. just using AEWP. I don't know if it's really that necessary for my current needs. However it looks like it might be the only recommended choice.
However, its design, where the privileged helper tool retains its privileges, certainly engenders some security risks. You must write that code securely.
This scares the crap outa me, as it makes me afraid that I do something wrong, I put my customers at risk, I guess you could say that with all the mechanisms we've discussed, but this feels like a big red flag.
Thanks Quinn, you've given me some more information to ponder. I still currently don't know which direction to take, but hopefully after some percolation, I'll make be able to make a better decision.
Sam Rowlands
p.s. I guess you've seen the appreciation thread happening on Twitter :)