MFC r322677: pw usermod: handle empty secondary group lists (-G '')

Description

MFC r322677: pw usermod: handle empty secondary group lists (-G '')

"pw usermod someuser -G ''" is supposed make sure that someuser
doesn't have any secondary group memberships.

Previouly it was a nop because split_groups() only intitialised
"groups" if at least one group was specified. As a result the
existing secondary group memberships were kept.

PR: 221417
Submitted by: Fabian Keil
Approved by: re (kib)
Obtained from: ElectroBSD
Relnotes: yes

Details

Committed
emasteFri, Sep 8, 9:16 PM
Parents
rS323332: MFC r322678: pw useradd: Validate the user name before creating the entry
Branches
Unknown
Tags
Unknown