mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-12 08:58:20 +03:00
userdbctl: correct uid_range_covers check
The third param should be the number of uids. (cherry picked from commit 8ef347de677218b4aa4b80bceff40a5740f4dc4b)
This commit is contained in:
parent
b6ddfe38a3
commit
01f82bf470
@ -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