Are ut_user and ut_host in struct utmp NUL-terminated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: GNU C Library <libc-alpha@xxxxxxxxxxxxxx>, "linux-man@xxxxxxxxxxxxxxx" <linux-man@xxxxxxxxxxxxxxx>
- Subject: Are ut_user and ut_host in struct utmp NUL-terminated?
- From: Florian Weimer <fweimer@xxxxxxxxxx>
- Date: Mon, 13 Aug 2018 14:10:52 +0200
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
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
[Index of Archives]
[Kernel Documentation]
[Netdev]
[Linux Ethernet Bridging]
[Linux Wireless]
[Kernel Newbies]
[Security]
[Linux for Hams]
[Netfilter]
[Bugtraq]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux Admin]
[Samba]