[launchd-dev] Mysterious problem with [NSURL getResourceValue:forKey:error:]

Quinn "The Eskimo!" eskimo1 at apple.com
Thu Aug 18 00:13:11 PDT 2016


On 18 Aug 2016, at 05:21, James Bucanek <subscriber at gloaming.com> wrote:

> The process is launched by a privileged helper (installed a la EvenBetterAuthorizationSample).

Let’s see if I understand this properly:

* You have a daemon, A, running as root.

* That daemon fork/exec's a helper tool, B.

* B switches its effective user ID to that of some user.

* B has mysterious problems.

If this is accurate, it’s not a huge surprise.  B is running in a parlous environment, because half of its context has been switched to that of the user but half of its environment has been inherited from the daemon.  It’s not uncommon for weird problems to crop up in that case. For example, have fun accessing the keychain from B (-:

Is B running as a role account user?  Or an actual user?

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware




More information about the launchd-dev mailing list