HomeFreeBSD

pw: Use existing group entry, even if it already has members

Description

pw: Use existing group entry, even if it already has members

Fix the following problem:

  1. A nonexistent user, someuser, is added to /etc/group as someuser:*:12345:someuser.
  2. someuser is then created with the default login group.

A second group entry for someuser will be created.

someuser:*:12345:someuser
someuser:*:12346:

With this fix, the existing group entry will be used.

PR: 238995
Reviewed by: bapt, jrm
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41057

Details

Provenance
mail_nsood.inAuthored on Jul 19 2023, 1:06 PM
jrmCommitted on Jul 19 2023, 1:40 PM
Reviewer
bapt
Differential Revision
D41057: pw: use existing group entry even if it already has members
Parents
rG17839f45d86e: pw: Ensure group membership is not duplicated
Branches
Unknown
Tags
Unknown