Are ut_user and ut_host in struct utmp NUL-terminated?

Florian Weimer fweimer@redhat.com
Mon Aug 13 12:10:00 GMT 2018


Can ut_user be exactly UT_NAMESIZE bytes long?  Or is it necessary to 
set aside a byte with the NUL terminator?

I'm not sure what POSIX says about struct utmpx.  It never says “string” 
in the context of ut_user, so I don't think it clarifies this matter.

Thanks,
Florian



More information about the Libc-alpha mailing list