sysutils/accountsservice: Fix a bug with the User.SetAccountType() method.

This call was removing a user from all its groups.

Sponsored by:	Serenity Cybersecurity, LLC
This commit is contained in:
Gleb Popov
2023-06-27 16:25:06 +03:00
parent 86d2df3431
commit 2352c3fed9
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
PORTNAME= accountsservice
PORTVERSION= 0.6.55
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= sysutils devel
MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/
@@ -0,0 +1,11 @@
--- src/util.c.orig 2019-04-23 15:16:09 UTC
+++ src/util.c
@@ -254,7 +254,7 @@ get_user_groups (const gchar *user,
*groups = g_new (gid_t, ngroups);
res = getgrouplist (user, group, *groups, &ngroups);
- return res;
+ return res == 0 ? ngroups : res;
}