Our code for trying to set the user-group/s of a specific process produces a deprecation warning when building on macOS 10.12 and beyond.
<pre>
warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]
if (::syscall(SYS_initgroups, ngroups, _gids, uid.get()) == -1) {
^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:745:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
</pre>
That warning is however not too helpful in that it references an entirely different system function.
Is there a replacement that can be used for macOS >=10.12 achieving the same?
One reference that we have used in the past are the samba sources as provided by Apple's opensource website (see this mirror for added convenience);
However I have failed to find any more recent samba source which, in thoery would use a non deprecated way of initializing/setting user-groups for the hosting process.
Thanks for any pointers!