Are ut_user and ut_host in struct utmp NUL-terminated?

Andreas Schwab schwab@suse.de
Mon Aug 13 12:44:00 GMT 2018


On Aug 13 2018, Florian Weimer <fweimer@redhat.com> wrote:

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

login from util-linux doesn't null terminate.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Libc-alpha mailing list