shadow-maint / shadow

Upstream shadow tree
Other
292 stars 228 forks source link

lib/chkname.c: Fix off by one validation of _SC_LOGIN_NAME_MAX #935

Closed stoeckmann closed 7 months ago

stoeckmann commented 7 months ago

According to sysconf manual page, _SC_LOGIN_NAME_MAX is the maximum name length, including the terminating null byte. Take this into account while validating user names.

Also support systems which might have no upper limit or no _SC_LOGIN_NAME_MAX at all.