Solaris Express Developer Edition What's New

uid_t and gid_t Type Changes

This developer tools enhancement is new in the Developer 9/07 release.

Starting with this release, the uid_t and gid_t types have been changed from long (32-bit binaries) and int (64-bit binaries) types to the uint32_t type. This type is used for both 32-bit and 64-bit binaries. This change promotes compatibility with other operating systems.

As part of changing the type of uid_t and gid_t, the Solaris implementation also reserves the uid_t and gid_t values that range from 231 to 232 - 2. The value 232 - 1 continues to be reserved for use as a sentinel value. Values that are assigned in this new range are temporary assignments made by the new identity mapping service. Note that, these values do not persist over a system reboot. Therefore, applications should not write UID or GID values to persistent files in the file system. Nor should applications send these values across a network connection as a means of referring to a persistent identity. For persistence, use the corresponding identity name. Solaris utilities, such as the tar command, and the NFSv4 network protocol, already follow these best practices.

Because the new and old uid_t and gid_t types occupy the same amount of space, existing binaries are not affected. For example, binaries that are compiled with older definitions. In these instances, there is no need to recompile the code. Binaries, object files, as well as shared libraries including libraries that are linked against Solaris shared libraries, are also not affected.

The impact of these changes are as following: