From: Alejandro Colomar Date: Sun, 12 Jul 2026 15:26:41 +0000 (+0200) Subject: src/newusers.c: Don't allow bad names in group names X-Git-Tag: 4.20.0-rc3~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ab86d56f269f9334e6ef6ae822d570eb6749a12;p=thirdparty%2Fshadow.git src/newusers.c: Don't allow bad names in group names Other programs handling groups don't allow this. I believe this was only accidentally allowed. Fixes: a2cd3e9ef03a (2019-10-04; "chkname.c, pwck.c, useradd.c, usermod.c, newusers.c: Allow names that do not conform to standards") Cc: ed Signed-off-by: Alejandro Colomar --- diff --git a/src/newusers.c b/src/newusers.c index c66f7ee4d..ae4cca0a4 100644 --- a/src/newusers.c +++ b/src/newusers.c @@ -288,7 +288,7 @@ static int add_group (const char *name, const char *gid, gid_t *ngid, uid_t uid) } /* Check if this is a valid group name */ - if (!is_valid_group_name(grent.gr_name, bflg)) { + if (!is_valid_group_name(grent.gr_name, false)) { fprintf (stderr, _("%s: invalid group name '%s'\n"), Prog, grent.gr_name);