Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 2023 13:40:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 238995] adduser does not check for pre-existing user field entries in /etc/group
Message-ID:  <bug-238995-227-hiIcLMsGr8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-238995-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-238995-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238995

--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3D17839f45d86e79065a65ad3e2522dd69b=
29a652c

commit 17839f45d86e79065a65ad3e2522dd69b29a652c
Author:     Naman Sood <mail@nsood.in>
AuthorDate: 2023-07-19 12:44:21 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2023-07-19 13:36:09 +0000

    pw: Ensure group membership is not duplicated

    Fix the following problem:

    1. A nonexistent user, someuser, is added to somegroup in /etc/group.
    2. someuser is then created with membership in somegroup.

    The entry for somegroup in /etc/group will then contain

        somegroup:*:12345:someuser,someuser

    With this fix, the entry will be

        somegroup:*:12345:someuser

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

 usr.sbin/pw/pw.h       | 2 ++
 usr.sbin/pw/pw_group.c | 2 +-
 usr.sbin/pw/pw_user.c  | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238995-227-hiIcLMsGr8>