int group_record_build(GroupRecord **ret, ...);
int group_record_clone(GroupRecord *g, UserRecordLoadFlags flags, GroupRecord **ret);
-int group_record_match(GroupRecord *h, const UserDBMatch *match);
+bool group_record_match(GroupRecord *h, const UserDBMatch *match);
const char* group_record_group_name_and_realm(GroupRecord *h);
UserDisposition group_record_disposition(GroupRecord *h);
}
bool user_name_fuzzy_match(const char *names[], size_t n_names, char **matches);
-int user_record_match(UserRecord *u, const UserDBMatch *match);
+bool user_record_match(UserRecord *u, const UserDBMatch *match);
bool user_record_matches_user_name(const UserRecord *u, const char *username);
/* NB: we always apply our own filtering here, explicitly, regardless if the server supported it or
* not. It's more robust this way, we never know how carefully the server is written, and whether it
* properly implements all details of the filtering logic. */
- r = user_record_match(ur, match);
- if (r < 0)
- return r;
- if (r == 0)
+ if (!user_record_match(ur, match))
return -ENOEXEC;
if (ret)
return r;
}
- r = user_record_match(ur, match);
- if (r < 0)
- return r;
- if (r == 0)
+ if (!user_record_match(ur, match))
return -ENOEXEC;
if (ret)
}
/* As above, we apply our own client-side filtering even if server-side filtering worked, for robustness and simplicity reasons. */
- r = group_record_match(gr, match);
- if (r < 0)
- return r;
- if (r == 0)
+ if (!group_record_match(gr, match))
return -ENOEXEC;
if (ret)
return r;
}
- r = group_record_match(gr, match);
- if (r < 0)
- return r;
- if (r == 0)
+ if (!group_record_match(gr, match))
return -ENOEXEC;
if (ret)