From: Mike Yuan Date: Mon, 8 Apr 2024 12:24:23 +0000 (+0800) Subject: userdbctl: correct uid_range_covers check X-Git-Tag: v256-rc1~265^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ef347de677218b4aa4b80bceff40a5740f4dc4b;p=thirdparty%2Fsystemd.git userdbctl: correct uid_range_covers check The third param should be the number of uids. --- diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index 835cea9c00c..918b4d772f2 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -535,7 +535,7 @@ static int table_add_gid_boundaries(Table *table, const UIDRange *p) { FOREACH_ARRAY(i, uid_range_table, ELEMENTSOF(uid_range_table)) { _cleanup_free_ char *name = NULL, *comment = NULL; - if (!uid_range_covers(p, i->first, i->last)) + if (!uid_range_covers(p, i->first, i->last - i->first + 1)) continue; name = strjoin(special_glyph(SPECIAL_GLYPH_ARROW_DOWN),