]> git.cameronkatri.com Git - pw-darwin.git/commit
pw usermod: Properly deal with empty secondary group lists (-G '')
authorEd Maste <emaste@FreeBSD.org>
Sat, 19 Aug 2017 00:19:23 +0000 (00:19 +0000)
committerEd Maste <emaste@FreeBSD.org>
Sat, 19 Aug 2017 00:19:23 +0000 (00:19 +0000)
commitd79c5099603f0afa9e292d79f9595563cd623cf3
tree7d42643c93fff34c94735547cb47e83ff24adf40
parentda48ebc4de409fe039826d36b1da1f78ff5f84fc
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
pw/pw_user.c