git: pw(8): Allow to change GID of non-root super users (UID=0)
aly at crater.dragonflybsd.org
Fri Feb 3 01:42:25 PST 2023
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.
Summary of changes:
usr.sbin/pw/pw_user.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
DragonFly BSD source repository
More information about the Commits