From: Michal Koutný Date: Mon, 3 Mar 2025 18:15:42 +0000 (+0100) Subject: userdb: Fix return value of groupdb_by_name() X-Git-Tag: v258-rc1~1199^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaeb96125a16f7cf7b071391c2d3456a8397f251;p=thirdparty%2Fsystemd.git userdb: Fix return value of groupdb_by_name() The commit 7419291670 ("userdb: move UserDBMatch handling from userdbctl into generic userdb code to allow it to be done server side") unintentionally passes return value from group_record_match() as its return value and thus diverges from other search functions that return 0 on success. Align that by returning 0 instead of 1, all existing callers are invariant to this change. --- diff --git a/src/shared/userdb.c b/src/shared/userdb.c index ea352de0004..18b98685dbd 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -1356,7 +1356,7 @@ int groupdb_by_name(const char *name, const UserDBMatch *match, UserDBFlags flag if (ret) *ret = TAKE_PTR(gr); - return r; + return 0; } static int groupdb_by_gid_fallbacks(