Don Cragun <[email protected]> wrote: > According to the Solaris 10 limits.h(3HEAD) man page, LOGNAME_MAX is an > invariant value defined in <limits.h>. It is described there as: > "The maximum number of bytes supported in a user's login name." > > So it is perfectly legitimate for a Solaris 10 application to define > an array as char logname[LOGNAME_MAX + 1] and copy an entry from a > struct passwd using > strncpy(logname, pwd.pw_name, LOGNAME_MAX); > logname[LOGNAME_MAX] = '\0'; > and know that it has copied the entire user's login name out of the > struct passwd. Programs aren't usually supposed to have to be rebuilt > for a Solaris minor release to continue working. That is why I > originally questioned whether this change should have a major release > binding. > > Note also that the value of LOGIN_NAME_MAX is specified to be 9 in > Oracle's (and Fujitsu's) UNIX '98 and UNIX '03 branding CSQs. If > you're going to change this value, Oracle will need to file for a new > UNIX brand and pay the associated branding fees to TOG. If Fujitsu
A quick check for users of the definition LOGNAME_MAX shows that no parts of Solaris that are relevant regarding to interfaces use this definition. There are however places like ./lib/libsec/common/acltext.c where this devinition definitely should not be used. The definition LOGNAME_MAX was used in the "utmp" and "wtmp" files with binary compatibility for AT&T UNIX versions from the 1970s in /var/adm/. These files have been used with larger limits in SunOS-3.x already and SunOS-5.x introduced "utmpx" and "wtmpx" files with the previous *BSD definitiony since 20 years. The old files are no longer in use with current Solaris version. There is a POSIX definition related to user name lenght in http://www.opengroup.org/onlinepubs/9699919799/utilities/pax.html uname and gname fields have 32 octets. This is the same value as used in the "utmpx" and "wtmpx" files. I recommend to look into the Solaris sources and fix the parts that still historically or by accident as in ./lib/libsec/common/acltext.c use a lower limit. Jörg -- EMail:[email protected] (home) Jörg Schilling D-13353 Berlin [email protected] (uni) [email protected] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ opensolaris-arc mailing list [email protected]
