HomeFreeBSD

pw usermod: Properly deal with empty secondary group lists (-G '')

Description

pw usermod: Properly deal with 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
Obtained from: ElectroBSD
MFC after: 1 week
Relnotes: yes

Details

Provenance
emasteAuthored on
Parents
rS322676: MFhead@r322675
Branches
Unknown
Tags
Unknown