adduser: Overhaul.
Most importantly:
- Make local variables local.
- Use $() instead of backticks.
- Avoid unsafe use of -a and -o operators in test expressions.
- Remove a hack intended to ease the transition from Perl 22 years ago.
MFC after: 1 week
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D44863
(cherry picked from commit 170d0882903eb75b92cd10e9a1bcbe57a647ae7d)
adduser: A few more improvements.
MFC after: 1 week
Reviewed by: jrm
Differential Revision: https://reviews.freebsd.org/D44871
(cherry picked from commit b37333899bd27a74bdef34b7f34eb41bc6bd51bd)
adduser: Fix a syntax error
Reported by: Jose Luis Duran <jlduran@gmail.com>
Fixes: b37333899bd2
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44871
(cherry picked from commit 5cafc38f11297cb302514f3cedb703a3ed199a22)