How to actively bless a privileged helper tool

Hello,


I am facing a problem with the blessing of a privileged helper tool. As far as I understand the tccd is taking care of this automatically when using

SMJobBless( ).


The console then correctly prints:

tccd: Making {ID: com.me.app, PID[1873], auid: 501, euid: 501, binary path: '/Applications/my.app/...'}

responsible for Privileged Helper {ID: com.my.HelperTool, PID[1930], auid: 0, euid: 0, binary path: '/Library/PrivilegedHelperTools/com.my.HelperTool'}; PID[1873]; rv = 0


We do have more than one SMAuthorizedClients i.e. the helper tool can be installed by more than one app (the app installer and the app itself).

The problem: It looks like tccd is following the first-come-first-serve rule. When installing the app (with the helper tool), the installer is blessing the helper tool. The app itself does not correctly work directly afterwards (permission problems). One needs a reboot so that the app can bless the helper tool.


The workaround: The app installer calls the deprecated SMJobRemove( ) after installation. The app then installs the helper tool again with SMJobBless( ).


Is this really the only solution to this problem or is it possible to reset blessing or actively bless a helper tool?


Thanks,

(and sorry for the double post, but this is in my eyes worth a new thread)

How to actively bless a privileged helper tool
 
 
Q