diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-25 02:54:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-25 02:54:53 +0000 |
commit | 527e791c5346846e2bc7d32f7597d70f9a274499 (patch) | |
tree | d2bd96487387b049f0a99182d4cfd066adddd039 /src/userdb/userdbctl.c | |
parent | Adding debian version 255.4-1. (diff) | |
download | systemd-527e791c5346846e2bc7d32f7597d70f9a274499.tar.xz systemd-527e791c5346846e2bc7d32f7597d70f9a274499.zip |
Merging upstream version 255.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/userdb/userdbctl.c')
-rw-r--r-- | src/userdb/userdbctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index a7db3fb..238a71d 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -310,6 +310,9 @@ static int table_add_uid_map( assert(table); assert(add_unavailable); + if (!p) + return 0; + for (size_t i = 0; p && i < p->n_entries; i++) { UidRangeEntry *x = p->entries + i; @@ -534,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), |