I have 2 basic questions related to Launch Constraints:
[Q1] Are Launch Constraints supposed to work when SIP is disabled?
From what I'm observing, when SIP is disabled, Launch Constraints (e.g. Launch Constraint Parent Process) are not enforced. I can understand that. But it's a bit confusing considering that the stack diagram in the WWDC 2023 session is placing the 'Environment Constraints' block under SIP, not above.
Also the documentation only mentions SIP for the 'is-sip-protected' fact.
[Q2] Is the SpawnConstraint key in legacy launchd plist files (i.e. inside /Library/Launch(Agents|Daemons)) officially supported?
From what I'm seeing, it seems to be working when SIP is enabled. But the WWDC session and the documentation don't really talk about this case.
Are Launch Constraints supposed to work when SIP is disabled?
Your observations are inline with my expectations. In general, disabling SIP turns off modern security features like this.
I encourage you to file a bug against the documentation to request clarification here. Please post your bug number, just for the record.
Is the SpawnConstraint key in legacy launchd plist files … officially supported?
I see no mention of it in the launchd.plist
man page, which is where I’d expect it to be documented.
But as a third-party developer I’m not sure that’s a significant restriction. If you’re building your own daemon or agent, you can bake spawn constraint into its code signature.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"