git: DragonFly_RELEASE_6_4 pw(8): Allow to change GID of non-root super users (UID=0)
Aaron LI
aly at crater.dragonflybsd.org
Fri Feb 3 01:45:20 PST 2023
commit f7be2ffa9778fbe4c168b9bed3044b15103c8e89
Author: Aaron LI <aly at aaronly.me>
Date: Fri Feb 3 12:03:51 2023 +0800
pw(8): Allow to change GID of non-root super users (UID=0)
pw(8) was silently refusing to change the GID/group of super users (i.e.,
UID=0), and thus couldn't change the group of 'toor' user.
Relax the policy a bit and only preventing from changing the GID/group
of 'root' user, and raise an error in that case. The 'root' is regarded
as the special super user and already has several special checks in the
code. So this change actually make the behavior more consistent.
This commit fixes the special case of 'tools/pw-update.sh' adding the
'toor' user. It first adds the user with group of 'nogroup' and later
change to its real group.
Bug: https://bugs.dragonflybsd.org/issues/3332
Summary of changes:
usr.sbin/pw/pw_user.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f7be2ffa9778fbe4c168b9bed3044b15103c8e89
--
DragonFly BSD source repository
More information about the Commits
mailing list