launchd.plist & SMJobBless
Hi list, I have problems in removing calls to AuthorizationExecuteWithPrivileges. So far I played with both SMJobBless and ssd (simple socket daemon) sample codes and I am happy with them separately. I also played successfully with unix sockets but now time has come to put everything altogether. For ssd, we have to install in /Library/LaunchDaemons a custom plist containing definitions of a Socket that will be used to launch the daemon on demand. For SMJobBless, we seem to have no hand on the plist, except for the Label key. Every other key seems to be ignored by SMJobBless. The question is: what is the recipe to tell launchd to launch a daemon installed through SMJobBless ? Thanks in advance & regards J. Laurens
This is an answer to my own problem I thought that SMJobBless was ignoring keys in the embedded launchd.plist. That was a mistake. In fact, I have been catched by the authorization tool that asks for a password to install something whereas SMJobBless did not install anything without real evidence. Thus all the keys that I added in the launchd.plist did not appear in the launch daemons plist just because I did not increase the bundle version! I understood that while reading the previous thread "Questions about SMJobBless" from eric gorr. Cleaning everything by hand solved my problem. Sorry for bothering you. Jerome Le 3 nov. 2011 à 12:54, Jérome Laurens a écrit :
Hi list,
I have problems in removing calls to AuthorizationExecuteWithPrivileges.
So far I played with both SMJobBless and ssd (simple socket daemon) sample codes and I am happy with them separately. I also played successfully with unix sockets but now time has come to put everything altogether.
For ssd, we have to install in /Library/LaunchDaemons a custom plist containing definitions of a Socket that will be used to launch the daemon on demand. For SMJobBless, we seem to have no hand on the plist, except for the Label key. Every other key seems to be ignored by SMJobBless.
The question is: what is the recipe to tell launchd to launch a daemon installed through SMJobBless ?
Thanks in advance & regards
J. Laurens _______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev
On 3 Nov 2011, at 11:54, Jérome Laurens wrote:
For SMJobBless, we seem to have no hand on the plist, except for the Label key. Every other key seems to be ignored by SMJobBless.
What makes you say that? AFAIK SMJobBless will copy across all the keys except the Label and ProgramArguments. Here's what the header doc says: The helper tool must have an embedded launchd plist. The only required key in this plist is the Label key. When the launchd plist is extracted and written to disk, the key for ProgramArguments will be set to an array of 1 element pointing to a standard location. You cannot specify your own program arguments, so do not rely on custom command line arguments being passed to your tool. Pass any parameters via IPC. Note that the only /required/ key is the Label key, but that doesn't mean that the only /supported/ key is the Label key. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
On Nov 4, 2011, at 9:19 AM, "Quinn \"The Eskimo!\"" <eskimo1@apple.com> wrote:
On 3 Nov 2011, at 11:54, Jérome Laurens wrote:
For SMJobBless, we seem to have no hand on the plist, except for the Label key. Every other key seems to be ignored by SMJobBless.
What makes you say that?
It's the behavior I see as well. If this is a bug, I would be happy to report it.
participants (3)
-
Eric Gorr
-
Jérome Laurens
-
Quinn "The Eskimo!"