Lines Matching refs:res
201 struct ldb_result *res = NULL;
203 ret = sysdb_getgrnam(mem_ctx, domain, name, &res);
205 assert_non_null(res);
207 return res;
215 struct ldb_result *res = NULL;
217 ret = sysdb_getpwnam(mem_ctx, domain, name, &res);
219 assert_non_null(res);
221 return res;
229 struct ldb_result *res;
235 ret = ldb_search(test_ctx->tctx->sysdb->ldb, test_ctx, &res,
237 if (ret != EOK || res == NULL || res->count != 1) {
238 talloc_free(res);
242 cache_expire_sysdb = ldb_msg_find_attr_as_uint64(res->msgs[0],
245 talloc_free(res);
364 struct ldb_result *res = NULL;
371 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME);
372 assert_int_equal(res->count, 0);
373 talloc_free(res);
507 struct ldb_result *res = NULL;
517 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME);
518 assert_int_equal(res->count, 0);
519 talloc_free(res);
566 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME);
567 assert_int_equal(res->count, 0);
568 talloc_free(res);
583 struct ldb_result *res = NULL;
593 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME);
594 assert_int_equal(res->count, 0);
595 talloc_free(res);
596 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom,
598 assert_int_equal(res->count, 0);
599 talloc_free(res);
648 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom,
650 assert_int_equal(res->count, 0);
651 talloc_free(res);
675 static void assert_ts_attrs_res(struct ldb_result *res,
679 return assert_ts_attrs_msg(res->msgs[0], exp_expiration, exp_last_update);
687 struct ldb_result res;
689 res.count = msgs_count;
690 res.msgs = msgs;
691 return assert_ts_attrs_res(&res, exp_expiration, exp_last_update);
702 struct ldb_result *res = NULL;
731 ret = sysdb_getgrnam(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME, &res);
733 assert_int_equal(res->count, 1);
734 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
735 talloc_free(res);
737 ret = sysdb_getgrgid(test_ctx, test_ctx->tctx->dom, TEST_GROUP_GID, &res);
739 assert_int_equal(res->count, 1);
740 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
741 talloc_free(res);
762 ret = sysdb_getgrnam(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME, &res);
764 assert_int_equal(res->count, 1);
765 assert_ts_attrs_res(res, TEST_NOW_3 + TEST_CACHE_TIMEOUT, TEST_NOW_3);
766 talloc_free(res);
791 struct ldb_result *res;
849 res = sss_merge_ldb_results(res1, res2);
850 assert_non_null(res);
851 assert_int_equal(res->count, 3);
864 struct ldb_result *res;
875 &res);
899 &res);
901 assert_int_equal(res->count, 1);
902 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
903 talloc_free(res);
922 &res);
938 struct ldb_result *res = NULL;
944 res = sysdb_getpwnam_res(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME);
945 assert_int_equal(res->count, 0);
946 talloc_free(res);
1027 struct ldb_result *res = NULL;
1037 res = sysdb_getpwnam_res(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME);
1038 assert_int_equal(res->count, 0);
1039 talloc_free(res);
1082 res = sysdb_getpwnam_res(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME);
1083 assert_int_equal(res->count, 0);
1084 talloc_free(res);
1109 struct ldb_result *res = NULL;
1138 ret = sysdb_getpwnam(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME, &res);
1140 assert_int_equal(res->count, 1);
1141 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
1142 talloc_free(res);
1145 ret = sysdb_getpwuid(test_ctx, test_ctx->tctx->dom, TEST_USER_UID, &res);
1147 assert_int_equal(res->count, 1);
1148 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
1149 talloc_free(res);
1172 ret = sysdb_getpwnam(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME, &res);
1174 assert_int_equal(res->count, 1);
1175 assert_ts_attrs_res(res, TEST_NOW_3 + TEST_CACHE_TIMEOUT, TEST_NOW_3);
1176 talloc_free(res);
1178 ret = sysdb_initgroups(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME, &res);
1180 assert_int_equal(res->count, 1);
1181 assert_ts_attrs_res(res, TEST_NOW_3 + TEST_CACHE_TIMEOUT, TEST_NOW_3);
1182 talloc_free(res);
1185 TEST_USER_NAME, pw_fetch_attrs, &res);
1187 assert_int_equal(res->count, 1);
1188 assert_ts_attrs_res(res, TEST_NOW_3 + TEST_CACHE_TIMEOUT, TEST_NOW_3);
1189 talloc_free(res);
1214 struct ldb_result *res;
1225 &res);
1247 &res);
1249 assert_int_equal(res->count, 1);
1250 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
1251 talloc_free(res);
1270 &res);
1288 struct ldb_result *res;
1309 ret = sysdb_getpwupn(test_ctx, test_ctx->tctx->dom, TEST_USER_UPN, &res);
1311 assert_int_equal(res->count, 1);
1312 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
1313 talloc_free(res);
1317 &res);
1319 assert_int_equal(res->count, 1);
1320 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
1321 talloc_free(res);
1330 TEST_USER_UPN, &res);
1332 assert_int_equal(res->count, 1);
1333 assert_ts_attrs_res(res, TEST_NOW_2 + TEST_CACHE_TIMEOUT, TEST_NOW_2);
1334 talloc_free(res);
1342 struct ldb_result *res = NULL;
1348 res = sysdb_getpwnam_res(test_ctx, test_ctx->tctx->dom, TEST_USER_NAME);
1349 assert_int_equal(res->count, 0);
1350 talloc_free(res);
1352 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx->dom, TEST_GROUP_NAME);
1353 assert_int_equal(res->count, 0);
1354 talloc_free(res);