3 ms·
Using PIDs to lookup the calling process doesn't seem like a great idea given the small PID space on macOS, I wonder if there could be a race there too.
by cjbprime 6y ago
Using PIDs to lookup the calling process doesn't seem like a great idea given the small PID space on macOS, I wonder if there could be a race there too.
- saagarjha 6y agoGenerally, code like this should be using the XPC audit token rather than the PID for such authentication. Alas, Apple, in its infinite wisdom, has kept this SPI private and undocumented but in a "if you care about security you should be using this nudge nudge wink wink" state for many years.