]> git.ipfire.org Git - thirdparty/shadow.git/commit
usermod: allow all group types with -G option 397/head
authorIker Pedrosa <ipedrosa@redhat.com>
Tue, 3 Aug 2021 06:57:20 +0000 (08:57 +0200)
committerIker Pedrosa <ipedrosa@redhat.com>
Tue, 3 Aug 2021 09:14:09 +0000 (11:14 +0200)
commite481437ab9ebe9a8bf8fbaabe986d42b2f765991
tree9422731e19972e51acc359d107a31d2ddd030199
parent065aae682c264fbd0bf6cad4a021e64304367365
usermod: allow all group types with -G option

The only way of removing a group from the supplementary list is to use
-G option, and list all groups that the user is a member of except for
the one that wants to be removed. The problem lies when there's a user
that contains both local and remote groups, and the group to be removed
is a local one. As we need to include the remote group with -G option
the command will fail.

This reverts commit 140510de9de4771feb3af1d859c09604043a4c9b. This way,
it would be possible to remove the remote groups from the supplementary
list.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1967641
Resolves: https://github.com/shadow-maint/shadow/issues/338

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
src/usermod.c