"Could not find domain for" while launching agent plist

New Contributor II


I am trying to deploy .pkg thru jss. My deployment works fine in Yosemite. I have the issues in installing in EL captain.

My pkg has a post installation .sh, which in turn lunch a helper exe tool. I am launching my agent plist from the helper tool using system("launchctl load /Library/LaunchAgents/com.myplist.plist") api. This gives me error "Could not find domain for" . Before the above line of code I am calling setuid() api too with current logged in users UID.

This might be a issue because of EL captains enhanced security feature as jamf runs the .pkg with root user. Is there a way to run the .pkg with non root context with Authorization?


Honored Contributor