Skip to content

Commit e738a9d

Browse files
aplopezalexey-tikhonov
authored andcommitted
NSS: Better handle ERR_NO_TS in sysdb_enumpwent_filter()
Although ts_res.count is set to 0 when sysdb_search_ts_users() return ERR_NO_TS, before using it we make an extra check to verify that the returned code is EOK. Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> (cherry picked from commit 0a739f8)
1 parent cb11e00 commit e738a9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/db/sysdb_search.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ int sysdb_enumpwent_filter(TALLOC_CTX *mem_ctx,
899899
goto done;
900900
}
901901

902-
if (ts_res.count > 0) {
902+
if (ret == EOK && ts_res.count > 0) {
903903
ret = sysdb_enum_dn_filter(tmp_ctx, &ts_res, attr_filter, domain->name,
904904
&dn_filter);
905905
if (ret != EOK) {

0 commit comments

Comments
 (0)