Date: Thu, 25 Jun 2026 03:05:43 +0000 From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 65fba082f44c - main - adduser: Normalize supplemental groups Message-ID: <6a3c9b07.1a92e.5de4420@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=65fba082f44cb9451d2b12bcd99c3287d0a47acc commit 65fba082f44cb9451d2b12bcd99c3287d0a47acc Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-06-25 03:05:36 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-06-25 03:05:36 +0000 adduser: Normalize supplemental groups Rather than insist on a space-separated list, normalize the input so that any number of spaces, commas, colons, or semicolons are accepted. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D57774 --- usr.sbin/adduser/adduser.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh index 94a59830c21e..96d567d133e0 100644 --- a/usr.sbin/adduser/adduser.sh +++ b/usr.sbin/adduser/adduser.sh @@ -574,13 +574,13 @@ get_groups() { if [ -z "$configflag" ]; then [ -z "$fflag" ] && echo -n "Login group is $_group. Invite $username" - [ -z "$fflag" ] && echo -n " into other (space separated) groups? [$ugroups]: " + [ -z "$fflag" ] && echo -n " into other groups? [$ugroups]: " else [ -z "$fflag" ] && echo -n "Enter additional groups [$ugroups]: " fi read _input - [ -n "$_input" ] && ugroups="$_input" + [ -n "$_input" ] && ugroups="$(echo "$_input" | tr -s ',:;' ' ')" } # get_expire_dateshome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3c9b07.1a92e.5de4420>
