length of user id

Don Libes libes at nbs-amrf.UUCP
Thu Jan 23 06:37:36 AEST 1986


What is the #define for the length of a user id?  All I see on our
4.2 system is the comment, "Assuming the number 8 is unwise." along
with the embedding of 8 literally in defining struct utmp in <utmp.h>.
I could find no other references to user name lengths in any other
.h files.

I've seen some people do

	#define USER_ID_LENGTH sizeof(utmp.ut_line)

but this makes me leery.  Indeed, another UNIX (4.1 derivative) here
uses 12 character ids, but has the same comment regarding the number
8 in its <utmp.h>.  Yes, its recording in utmp has an obvious
problem but it doesn't seem to bother any utilities.

Don Libes    {seismo,umcp-cs}!nbs-amrf!libes



More information about the Comp.unix.wizards mailing list