mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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
This commit is contained in:
1 parent
4d299a767a
commit
65fba082f4
1 file changed
+2
-2
@@ -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_dates
|
||||
|
||||
Reference in new issue
Block a user