/sssd/src/tests/cmocka/ |
H A D | common_mock_be.c | 26 struct be_ctx *mock_be_ctx(TALLOC_CTX *mem_ctx, struct sss_test_ctx *tctx) argument 33 be_ctx->cdb = tctx->confdb; 34 be_ctx->ev = tctx->ev; 35 be_ctx->domain = tctx->dom; 36 be_ctx->conf_path = tctx->conf_dom_path;
|
H A D | common_mock_be.h | 28 struct be_ctx *mock_be_ctx(TALLOC_CTX *mem_ctx, struct sss_test_ctx *tctx);
|
H A D | test_sysdb_subdomains.c | 57 struct sss_test_ctx *tctx; member in struct:subdom_test_ctx 75 test_ctx->tctx = create_multidom_test_ctx(test_ctx, TESTS_PATH, 78 assert_non_null(test_ctx->tctx); 104 ret = sysdb_subdomain_store(test_ctx->tctx->sysdb, 109 ret = sysdb_update_subdomains(test_ctx->tctx->dom); 112 assert_non_null(test_ctx->tctx->dom->subdomains); 113 assert_string_equal(test_ctx->tctx->dom->subdomains->name, dom1[0]); 114 assert_int_equal(test_ctx->tctx->dom->subdomains->trust_direction, 0); 116 ret = sysdb_subdomain_store(test_ctx->tctx->sysdb, 121 ret = sysdb_update_subdomains(test_ctx->tctx [all...] |
H A D | test_responder_cache_req.c | 74 req = send_fn(req_mem_ctx, ctx->tctx->ev, ctx->rctx, \ 80 ret = test_ev_loop(ctx->tctx); \ 88 struct sss_test_ctx *tctx; member in struct:cache_req_test_ctx 126 ctx->tctx->error = cache_req_user_by_name_recv(ctx, req, 132 ctx->tctx->done = true; 141 ctx->tctx->error = cache_req_user_by_id_recv(ctx, req, 145 ctx->tctx->done = true; 154 ctx->tctx->error = cache_req_group_by_name_recv(ctx, req, 160 ctx->tctx->done = true; 169 ctx->tctx [all...] |
H A D | test_sysdb_ts_cache.c | 68 struct sss_test_ctx *tctx; member in struct:sysdb_ts_test_ctx 89 test_ctx->tctx = create_multidom_test_ctx(test_ctx, TESTS_PATH, 92 assert_non_null(test_ctx->tctx); 235 ret = ldb_search(test_ctx->tctx->sysdb->ldb, test_ctx, &res, 255 dn = sysdb_group_dn(test_ctx, test_ctx->tctx->dom, name); 271 dn = sysdb_user_dn(test_ctx, test_ctx->tctx->dom, name); 292 ret = sysdb_search_ts_entry(test_ctx, test_ctx->tctx->sysdb, 315 dn = sysdb_group_dn(test_ctx, test_ctx->tctx->dom, name); 331 dn = sysdb_user_dn(test_ctx, test_ctx->tctx->dom, name); 371 res = sysdb_getgrnam_res(test_ctx, test_ctx->tctx [all...] |
H A D | test_simple_access.c | 40 struct sss_test_ctx *tctx; member in struct:simple_test_ctx 60 simple_test_ctx->tctx = create_dom_test_ctx(simple_test_ctx, TESTS_PATH, 63 assert_non_null(simple_test_ctx->tctx); 64 if (simple_test_ctx->tctx == NULL) { 68 ret = sss_names_init(simple_test_ctx, simple_test_ctx->tctx->confdb, 69 TEST_DOM_NAME, &simple_test_ctx->tctx->dom->names); 75 simple_test_ctx->tctx); 91 simple_test_ctx->params->ev = simple_test_ctx->tctx->ev; 115 ret = confdb_add_param(test_ctx->tctx->confdb, 146 test_ctx->ctx->domain = test_ctx->tctx [all...] |
H A D | test_responder_common.c | 94 struct sss_test_ctx *tctx; member in struct:parse_inp_test_ctx 107 parse_inp_ctx->tctx = create_dom_test_ctx(parse_inp_ctx, TESTS_PATH, 110 assert_non_null(parse_inp_ctx->tctx); 113 parse_inp_ctx->tctx->ev, 114 parse_inp_ctx->tctx->dom, 124 ret = sysdb_master_domain_update(parse_inp_ctx->tctx->dom); 178 test_ev_done(parse_inp_ctx->tctx, EOK); 199 ret = test_ev_loop(parse_inp_ctx->tctx); 220 ret = test_ev_loop(parse_inp_ctx->tctx); 242 ret = test_ev_loop(parse_inp_ctx->tctx); [all...] |
H A D | test_nss_srv.c | 47 struct sss_test_ctx *tctx; member in struct:nss_test_ctx 135 nss_test_ctx->tctx->error = check_cb(sss_packet_get_status(packet), 137 nss_test_ctx->tctx->done = true; 148 nss_test_ctx->tctx->done = true; 149 nss_test_ctx->tctx->error = ENOENT; 397 ret = sysdb_set_user_attr(nss_test_ctx->tctx->dom, 538 ret = store_user(nss_test_ctx, nss_test_ctx->tctx->dom, 553 ret = test_ev_loop(nss_test_ctx->tctx); 574 ret = test_ev_loop(nss_test_ctx->tctx); 582 nss_test_ctx->tctx [all...] |
H A D | test_sysdb_sudo.c | 60 struct sss_test_ctx *tctx; member in struct:sysdb_test_ctx 137 ret = sysdb_search_sudo_rules(test_ctx, test_ctx->tctx->dom, 159 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB, 161 assert_non_null(test_ctx->tctx); 163 create_groups(test_ctx->tctx->dom); 164 create_users(test_ctx->tctx->dom); 166 reset_ldb_errstrings(test_ctx->tctx->dom); 181 reset_ldb_errstrings(test_ctx->tctx->dom); 207 ret = sysdb_sudo_store(test_ctx->tctx->dom, &rule, 1); 213 ret = sysdb_search_sudo_rules(test_ctx, test_ctx->tctx [all...] |
H A D | test_krb5_common.c | 49 struct sss_test_ctx *tctx; member in struct:test_ctx 61 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB, 64 assert_non_null(test_ctx->tctx); 187 ret = sss_krb5_get_options(test_ctx, test_ctx->tctx->confdb, 195 ret = sss_krb5_check_options(opts, test_ctx->tctx->dom, krb5_ctx); 202 ret = sss_krb5_check_options(opts, test_ctx->tctx->dom, krb5_ctx); 208 ret = sss_krb5_check_options(opts, test_ctx->tctx->dom, krb5_ctx); 213 ret = sss_krb5_check_options(opts, test_ctx->tctx->dom, krb5_ctx); 218 ret = sss_krb5_check_options(opts, test_ctx->tctx->dom, krb5_ctx); 224 ret = sss_krb5_check_options(opts, test_ctx->tctx [all...] |
H A D | test_krb5_wait_queue.c | 120 struct sss_test_ctx *tctx; member in struct:test_krb5_wait_queue 137 test_ctx->tctx = create_ev_test_ctx(test_ctx); 140 test_ctx->be_ctx = mock_be_ctx(test_ctx, test_ctx->tctx); 196 test_ctx->tctx->ev, 203 ret = test_ev_loop(test_ctx->tctx); 219 test_ev_done(test_ctx->tctx, EOK); 238 test_ctx->tctx->ev, 246 ret = test_ev_loop(test_ctx->tctx); 265 test_ev_done(test_ctx->tctx, EOK); 285 test_ctx->tctx [all...] |
H A D | test_nested_groups.c | 61 struct sss_test_ctx *tctx; member in struct:nested_groups_test_ctx 127 ctx->tctx->error = sdap_nested_group_recv(ctx, req, 133 ctx->tctx->done = true; 157 req = sdap_nested_group_send(req_mem_ctx, test_ctx->tctx->ev, 163 ret = test_ev_loop(test_ctx->tctx); 219 req = sdap_nested_group_send(req_mem_ctx, test_ctx->tctx->ev, 225 ret = test_ev_loop(test_ctx->tctx); 279 req = sdap_nested_group_send(req_mem_ctx, test_ctx->tctx->ev, 285 ret = test_ev_loop(test_ctx->tctx); 344 req = sdap_nested_group_send(req_mem_ctx, test_ctx->tctx [all...] |
/sssd/src/tools/ |
H A D | sss_usermod.c | 69 struct tools_ctx *tctx = NULL; local 157 ret = init_sss_tools(&tctx); 171 ret = parse_name_domain(tctx, pc_username); 178 ret = sysdb_getpwnam_sync(tctx, tctx->octx->name, tctx->octx); 186 if (id_in_range(tctx->octx->uid, tctx->octx->domain) != EOK) { 193 ret = parse_groups(tctx, addgroups, &tctx [all...] |
H A D | sss_useradd.c | 61 struct tools_ctx *tctx = NULL; local 116 ret = init_sss_tools(&tctx); 130 ret = parse_name_domain(tctx, pc_username); 138 ret = parse_groups(tctx, groups, &tctx->octx->addgroups); 147 ret = parse_group_name_domain(tctx, tctx->octx->addgroups); 157 ret = check_group_names(tctx, tctx->octx->addgroups, &badgroup); 165 tctx [all...] |
H A D | sss_groupadd.c | 47 struct tools_ctx *tctx = NULL; local 81 ret = init_sss_tools(&tctx); 95 ret = parse_name_domain(tctx, pc_groupname); 102 tctx->octx->gid = pc_gid; 105 if (id_in_range(tctx->octx->gid, tctx->octx->domain) != EOK) { 111 tctx->error = sysdb_transaction_start(tctx->sysdb); 112 if (tctx->error != EOK) { 119 tctx [all...] |
H A D | sss_groupmod.c | 52 struct tools_ctx *tctx = NULL; local 108 ret = init_sss_tools(&tctx); 121 ret = parse_name_domain(tctx, pc_groupname); 128 ret = sysdb_getgrnam_sync(tctx, tctx->octx->name, tctx->octx); 137 tctx->octx->gid = pc_gid; 140 ret = parse_groups(tctx, addgroups, &tctx->octx->addgroups); 149 ret = parse_group_name_domain(tctx, tct [all...] |
H A D | sss_userdel.c | 74 static int kick_user(struct tools_ctx *tctx) argument 80 tctx->octx->lock = 1; 82 ret = usermod(tctx, tctx->octx); 92 KILL_CMD_USER_FLAG, tctx->octx->name, 123 struct tools_ctx *tctx = NULL; local 193 ret = init_sss_tools(&tctx); 207 ret = parse_name_domain(tctx, pc_username); 217 ret = userdel_defaults(tctx, tctx [all...] |
H A D | sss_groupdel.c | 38 struct tools_ctx *tctx = NULL; local 75 ret = init_sss_tools(&tctx); 89 ret = parse_name_domain(tctx, pc_groupname); 96 ret = sysdb_getgrnam_sync(tctx, tctx->octx->name, tctx->octx); 102 if ((tctx->octx->gid < tctx->local->id_min) || 103 (tctx->local->id_max && tctx [all...] |
H A D | tools_util.c | 134 int parse_group_name_domain(struct tools_ctx *tctx, argument 147 ret = sss_parse_name(tctx, tctx->snctx, groups[i], &domain, &name); 157 if (strcmp(domain, tctx->octx->domain->name) != 0) { 163 groups[i] = talloc_strdup(tctx, name); 178 int parse_name_domain(struct tools_ctx *tctx, argument 184 ret = sss_parse_name(tctx, tctx->snctx, fullname, &domain, &tctx->octx->name); 189 DEBUG(SSSDBG_FUNC_DATA, "Parsed username: %s\n", tctx 213 check_group_names(struct tools_ctx *tctx, char **grouplist, char **badgroup) argument 285 struct tools_ctx *tctx; local 518 run_userdel_cmd(struct tools_ctx *tctx) argument [all...] |
H A D | sss_cache.c | 127 struct cache_tool_ctx **tctx); 135 static errno_t update_all_filters(struct cache_tool_ctx *tctx, 141 struct cache_tool_ctx *tctx = NULL; local 146 ret = init_context(argc, argv, &tctx); 153 for (dinfo = tctx->domains; dinfo; 166 ret = update_all_filters(tctx, dinfo); 179 skipped &= !invalidate_entries(tctx, dinfo, TYPE_USER, 180 tctx->user_filter, 181 tctx->user_name); 182 skipped &= !invalidate_entries(tctx, dinf 243 update_filter(struct cache_tool_ctx *tctx, struct sss_domain_info *dinfo, char *name, bool update, const char *fmt, enum sss_cache_entry entry_type, bool force_case_sensitivity, char **_filter) argument 347 update_all_filters(struct cache_tool_ctx *tctx, struct sss_domain_info *dinfo) argument 645 init_context(int argc, const char *argv[], struct cache_tool_ctx **tctx) argument [all...] |
H A D | tools_util.h | 66 int parse_name_domain(struct tools_ctx *tctx, 76 int parse_group_name_domain(struct tools_ctx *tctx, 79 int check_group_names(struct tools_ctx *tctx, 100 int run_userdel_cmd(struct tools_ctx *tctx); 111 errno_t sss_mc_refresh_grouplist(struct tools_ctx *tctx,
|
/sssd/src/python/ |
H A D | pysss.c | 112 struct tools_ctx *tctx = NULL; local 114 tctx = talloc_zero(self->mem_ctx, struct tools_ctx); 115 if (tctx == NULL) { 119 tctx->confdb = self->confdb; 120 tctx->sysdb = self->sysdb; 121 tctx->local = self->local; 122 /* tctx->nctx is NULL here, which is OK since we don't parse domains 125 octx = talloc_zero(tctx, struct ops_ctx); 132 tctx->octx = octx; 133 return tctx; 158 struct tools_ctx *tctx = NULL; local 313 struct tools_ctx *tctx = NULL; local 423 struct tools_ctx *tctx = NULL; local 544 struct tools_ctx *tctx = NULL; local 615 struct tools_ctx *tctx = NULL; local 662 struct tools_ctx *tctx = NULL; local 970 TALLOC_CTX *tctx = NULL; local [all...] |
/sssd/src/tests/ |
H A D | common_tev.c | 79 int test_ev_loop(struct sss_test_ctx *tctx) argument 81 while (!tctx->done) 82 tevent_loop_once(tctx->ev); 84 return tctx->error; 87 void test_ev_done(struct sss_test_ctx *tctx, errno_t ret) argument 89 tctx->error = ret; 90 tctx->done = true;
|
/sssd/src/tests/cwrap/ |
H A D | test_negcache.c | 84 struct sss_test_ctx *tctx; member in struct:ncache_test_ctx 130 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB, 132 assert_non_null(test_ctx->tctx); 134 create_groups(test_ctx, test_ctx->tctx->dom); 135 create_users(test_ctx, test_ctx->tctx->dom); 215 ret = set_user_in_ncache(test_ctx->ncache, false, test_ctx->tctx->dom, 219 ret = set_user_in_ncache(test_ctx->ncache, false, test_ctx->tctx->dom, 229 ret = check_user_in_ncache(test_ctx->ncache, test_ctx->tctx->dom, 233 ret = check_user_in_ncache(test_ctx->ncache, test_ctx->tctx->dom, 237 ret = check_user_in_ncache(test_ctx->ncache, test_ctx->tctx [all...] |
/sssd/src/tests/cmocka/data_provider/ |
H A D | test_dp_builtin.c | 39 struct sss_test_ctx *tctx; member in struct:test_ctx 54 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB, 56 assert_non_null(test_ctx->tctx); 58 test_ctx->be_ctx = mock_be_ctx(test_ctx, test_ctx->tctx); 101 tevent_loop_wait(test_ctx->tctx->ev); 128 tevent_loop_wait(test_ctx->tctx->ev);
|