Bug#264879: [Pkg-shadow-devel] Bug#264879: passwd: useradd allows invalid characters as username

Alexander Gattin Alexander Gattin <arg@online.com.ua>, 264879@bugs.debian.org
Sun, 8 May 2005 17:56:30 +0300


tags 264879 pending
thanks

> OK. My proposal remains the same: I'll just fix the
> "relaxed good_name" patch and probably also disable
> usage of '\n' char in user/groupnames.

I have done it.

Now user/group names are considered acceptable only if
they match ^[^-:\n][^:\n]*$

This is done to preserve /etc/{passwd|shadow|group|gshadow}
integrity and not confuse shadow tools with user/group
names looking like option names.

This is all sanity checks that we intend to perform.
Everything else should be done by higher level
(e.g. adduser).

-- 
WBR,
xrgtn