This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Are ut_user and ut_host in struct utmp NUL-terminated?
- From: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, "linux-man\@vger.kernel.org" <linux-man at vger dot kernel dot org>
- Date: Mon, 13 Aug 2018 14:44:25 +0200
- Subject: Re: Are ut_user and ut_host in struct utmp NUL-terminated?
- References: <11742781-3872-5bbf-55d6-8ce597f21e53@redhat.com>
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."