]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/chkname.c: Update regex for valid names
authorAlejandro Colomar <alx@kernel.org>
Mon, 13 Nov 2023 12:33:37 +0000 (13:33 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sun, 26 Nov 2023 12:56:33 +0000 (06:56 -0600)
commita5cddf243acab50c4c62e21e0b9f37ca70acea74
treee02ff7ecaa47ebed75544b572893e1a1dd150a46
parentfe62fc48bfa3fd42802644f7bdfcbbbc42fdba13
lib/chkname.c: Update regex for valid names

The maximum length of 32 wasn't being enforced in the code, and POSIX
doesn't specify that maximum length either, so it seems it was an
arbitrary limit of the past that doesn't exist any more.  Use a regex
that has no length limit.

Closes: <https://github.com/shadow-maint/shadow/issues/836>
Link: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/chkname.c