Re: Maximum uid and how to indicate "any user"
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com El 11/07/2005, a las 18:24, Jason Townsend escribió: 1. Go with the "long long" suggestion. Cheers, Greg _______________________________________________ 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: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... UIDs are 32 bit signed integers as stored in the user records (as you saw with the nobody UID of -2). I would recommend against assuming that any possible 32 bit value means anything special because there are some cases where larger numbers are mapped onto the 32 bit UID space (primarily when integrating with Active Directory). The suggestion of using a long long would be a reasonable approach. To answer your last question, UIDs are what they are and can't be changed without breaking binary compatibility. However, there are already 128 bit GUID/UUIDs present on the system which are now used in Tiger to support nested groups and ACLs. These are stored in the standard hex format for UUIDs, which looks like this: 72DD37F9-1B8F-4BEB-BCBF-7958D7314AF8. They are stored in the GeneratedUID attribute in user and group records (and other record types as well). These IDs are parallel to the existing UIDs and GIDs. Thanks very much for the detailed info, Jason. On the basis of this info I have two options: 2. Forget about using any special value to indicate "any user" and instead break my single method into two separate ones, one for use with a specified uid and another for "any user"... I had only wanted to avoid code duplication by using the same method to do two things, but given the subtleties and complexities of user ids I think I might just have to bite the bullet and split it into two methods. There is not a huge difference here, but I like doing things The Right Way if I can. This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg Hurrell