From 47c5ca237b3074e143ad77a5926d9f442ed17eb3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Nov 2024 11:26:34 +0100 Subject: userdbctl: respect selected disposition also when showing gid boundaries Follow-up for: ad5de3222f7 --- src/userdb/userdbctl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index 19de87d01e..bc69175b10 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -585,6 +585,9 @@ static int table_add_gid_boundaries(Table *table, const UIDRange *p) { FOREACH_ELEMENT(i, uid_range_table) { _cleanup_free_ char *name = NULL, *comment = NULL; + if (!FLAGS_SET(arg_disposition_mask, UINT64_C(1) << i->disposition)) + continue; + if (!uid_range_covers(p, i->first, i->last - i->first + 1)) continue; -- cgit v1.2.3