mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
userdbctl: correct uid_range_covers check
The third param should be the number of uids. (cherry picked from commit 8ef347de677218b4aa4b80bceff40a5740f4dc4b) (cherry picked from commit 01f82bf4702b69dddab471c4b01c817eba513ff6) (cherry picked from commit c7f884fb637ec08c3a091c3a4555ab1f4f10bf0c)
This commit is contained in:
parent
4872cf662e
commit
86b131913e
@ -537,7 +537,8 @@ static int table_add_gid_boundaries(Table *table, const UidRange *p) {
|
||||
for (size_t i = 0; i < ELEMENTSOF(uid_range_table); i++) {
|
||||
_cleanup_free_ char *name = NULL, *comment = NULL;
|
||||
|
||||
if (!uid_range_covers(p, uid_range_table[i].first, uid_range_table[i].last))
|
||||
if (!uid_range_covers(p, uid_range_table[i].first,
|
||||
uid_range_table[i].last - uid_range_table[i].first + 1))
|
||||
continue;
|
||||
|
||||
name = strjoin(special_glyph(SPECIAL_GLYPH_ARROW_DOWN),
|
||||
|
Loading…
x
Reference in New Issue
Block a user