mirror of
https://github.com/systemd/systemd.git
synced 2025-03-13 00:58:27 +03:00
user-record: make a NULL UserDBMatch be equivalent to no filtering
This commit is contained in:
parent
6a43f0a73c
commit
83eabe102a
@ -346,7 +346,9 @@ bool group_record_matches_group_name(const GroupRecord *g, const char *group_nam
|
||||
|
||||
int group_record_match(GroupRecord *h, const UserDBMatch *match) {
|
||||
assert(h);
|
||||
assert(match);
|
||||
|
||||
if (!match)
|
||||
return true;
|
||||
|
||||
if (h->gid < match->gid_min || h->gid > match->gid_max)
|
||||
return false;
|
||||
|
@ -2694,7 +2694,9 @@ bool user_name_fuzzy_match(const char *names[], size_t n_names, char **matches)
|
||||
|
||||
int user_record_match(UserRecord *u, const UserDBMatch *match) {
|
||||
assert(u);
|
||||
assert(match);
|
||||
|
||||
if (!match)
|
||||
return true;
|
||||
|
||||
if (u->uid < match->uid_min || u->uid > match->uid_max)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user