[Pkg-shadow-devel] Preparation of the next 4.1.3 release

Nicolas François nicolas.francois at centraliens.net
Thu Apr 9 23:27:39 UTC 2009


On Mon, Apr 06, 2009 at 04:41:12PM +0200, pvrabec at redhat.com wrote:
> Hi,
> 
> I'll check the release candidate and let you know about the result as soon as 
> possible. April 13 would be great.
> 
> btw.
> chkname.c:is_valid_user_name
> ...
> if (strlen (name) > sizeof (ut.ut_user)
> ...
> why not strlen (name)+1 ?

I did not find references in manpages, but IIRC, utmp string may be not
nul-terminated strings.
(Googling for ut_user nul-terminated seems to confirm this)


If a nul fits, the string is nul-terminated, but if the user has the exact
size, no nul character are added.

Best Regards,
-- 
Nekral



More information about the Pkg-shadow-devel mailing list