site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com
Le 17 févr. 2020 à 19:23, Sandor Szatmari <admin.szatmari.net@gmail.com> a écrit :
Ahh, Got it.
This is what I’ve used for that in the past
https://developer.apple.com/library/archive/documentation/System/Conceptual/...
Pascal,
Could you emulate your needs with it?
Hello, I haven't found how to use the previous link for groups. But after I've found the following link: https://developer.apple.com/library/archive/documentation/System/Conceptual/... And an example: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neut... My emulation code is then: #ifdef __APPLE__ int group_member(gid_t gid) { int ngroups, i, ret; int groups[NGROUPS_MAX]; ngroups = NGROUPS_MAX; if (getgrouplist(getlogin(), -1, groups, &ngroups) == -1) { printf ("Groups array is too small: %d\n", ngroups); } ret = 0; for (i = 0; i < ngroups; i++) { if (gid == groups[i]) ret = i; } return ret; } #endif Regards, Pascal. https://blady.pagesperso-orange.fr _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com
participants (1)
-
Pascal via Darwin-dev