Re: Yet another privileged-helper-tool question: how to launch from a system-preferences panel?
Re: Yet another privileged-helper-tool question: how to launch from a system-preferences panel?
- Subject: Re: Yet another privileged-helper-tool question: how to launch from a system-preferences panel?
- From: Motti Shneor <email@hidden>
- Date: Thu, 14 Jan 2016 15:28:04 +0200
I could, but this is ugly and insecure, and I’m afraid if that Cocoa-App has any UI footprint, it’s also unacceptable in terms of user experience.
Notice Apple’s own “Sharing” system-preference panel launches/quits daemons with no problem, though I don’t know if any of them runs privileged.
What I’m really looking for, is some hint about how SMJobBless works, and whether (or not) I can configure it in runtime, as opposed to configure it via those specific application-bundle info-plist entries.
I’d like to know why doesn’t it get the entries from my System Preference code bundle, and only goes for the “main bundle” which is the System Preferences.app bundle.
> On 13 בינו׳ 2016, at 18:00, Damien DeVille <email@hidden> wrote:
>
> Hey Motti,
>
> Could you maybe have a Cocoa app in your pref pane bundle that could talk to the privileged daemon? You would launch it from the pref pane, it would bless the tool on your behalf and you would communicate between the privileged app and the pref pane via the helper app?
>
> That’s definitely not ideal but it sounds like it could solve your problem?
>
> Thanks,
> Damien
>
>> On Jan 13, 2016, at 9:42 AM, Motti Shneor <email@hidden> wrote:
>>
>> Hi.
>>
>> I tried to modify the SMJobBless sample from Apple to use a System-Preference panel, instead of an independent Cocoa App, to launch a privileged launchd daemon.
>>
>> I build both the preferences panel and my helper tool in the same way, and apply (using the attached python script) the “trust” entries of both info.plist files (of my preferences panel and the helper tool). It all runs - but fails to launch the daemon.
>>
>> I suspect it is because my Preferences panel, although being a code bundle - is loaded and runs inside of the “System Preferences” application, which both my helper-tool doesn’t trust, and doesn’t trust my helper tool.
>>
>> Now — of course I cannot modify the “System Preferences” application’s info.plist. What then can I do? Idea anyone?
>>
>> Motti Shneor
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden