Is it possible to influence at what UID MacPorts start to create users?

Ryan Schmidt ryandesign at macports.org
Thu Aug 15 23:13:24 UTC 2019



On Aug 14, 2019, at 17:49, Gerben Wierda wrote:

> If this is a bug, I suggest using 600, not 500 for the fix.100 local users on a mac seems adequate (like 640kB…) and server starts at 1025, so ample room for services.

As I said, I believe our intention was to use the same range of UIDs and GIDs that Apple used to create normal user accounts. If Apple starts at 501, it was a bug for us to start at 500, and the fix for the bug would be to start at 501.

Note that we also create a "macports" user and group at MacPorts installation time. The code for that is separate from the code that creates users and groups for ports. There are two copies of the "macports" user/group creation code: one in Makefile.in for users who build from source, and one in the Installer package, the source for which is in portmgr/dmg/postflight.in. Both of these search for an empty UID starting at 501, not 500. And they don't specify what range to use for group IDs; they just ask the system for the next free GID.

If you want our range not to overlap Apple's range, that's a separate feature request that we could certainly consider. Off the top of my head I can't think of any problems with that but I don't know why it was originally chosen to overlap Apple's range.

Note that our user handling originates from an old version of Mac OS X in which Apple created both a UID and a GID for each user. (Tiger and earlier maybe?) Current versions of macOS no longer do that; for example my main user is not a member of its own group, but rather of the group "staff". I don't know if it still makes sense for us to create a separate group for each user that we create, but I suppose that's another separate issue.



More information about the macports-users mailing list