Lines Matching refs:idmap_ctx
30 sdap_idmap_get_configured_external_range(struct sdap_idmap_ctx *idmap_ctx,
38 if (idmap_ctx == NULL) {
42 id_ctx = idmap_ctx->id_ctx;
81 sdap_idmap_add_configured_external_range(struct sdap_idmap_ctx *idmap_ctx)
88 ret = sdap_idmap_get_configured_external_range(idmap_ctx, &range);
95 id_ctx = idmap_ctx->id_ctx;
97 err = sss_idmap_add_auto_domain_ex(idmap_ctx->map,
111 errno_t sdap_idmap_find_new_domain(struct sdap_idmap_ctx *idmap_ctx,
117 ret = sdap_idmap_add_domain(idmap_ctx,
147 struct sdap_idmap_ctx *idmap_ctx = NULL;
152 idmap_ctx = talloc_zero(tmp_ctx, struct sdap_idmap_ctx);
153 if (!idmap_ctx) {
157 idmap_ctx->id_ctx = id_ctx;
158 idmap_ctx->find_new_domain = sdap_idmap_find_new_domain;
160 idmap_lower = dp_opt_get_int(idmap_ctx->id_ctx->opts->basic,
162 idmap_upper = dp_opt_get_int(idmap_ctx->id_ctx->opts->basic,
164 rangesize = dp_opt_get_int(idmap_ctx->id_ctx->opts->basic,
166 autorid_mode = dp_opt_get_bool(idmap_ctx->id_ctx->opts->basic,
168 extra_slice_init = dp_opt_get_int(idmap_ctx->id_ctx->opts->basic,
191 err = sss_idmap_init(sss_idmap_talloc, idmap_ctx,
193 &idmap_ctx->map);
206 err = sss_idmap_ctx_set_autorid(idmap_ctx->map, autorid_mode);
207 err |= sss_idmap_ctx_set_lower(idmap_ctx->map, idmap_lower);
208 err |= sss_idmap_ctx_set_upper(idmap_ctx->map, idmap_upper);
209 err |= sss_idmap_ctx_set_rangesize(idmap_ctx->map, rangesize);
210 err |= sss_idmap_ctx_set_extra_slice_init(idmap_ctx->map, extra_slice_init);
221 if (!dp_opt_get_bool(idmap_ctx->id_ctx->opts->basic, SDAP_ID_MAPPING)) {
222 ret = sdap_idmap_add_configured_external_range(idmap_ctx);
271 ret = sdap_idmap_add_domain(idmap_ctx, dom_name,
285 dom_name = dp_opt_get_string(idmap_ctx->id_ctx->opts->basic, SDAP_IDMAP_DEFAULT_DOMAIN);
288 dom_name = idmap_ctx->id_ctx->be->domain->name;
289 ret = dp_opt_set_string(idmap_ctx->id_ctx->opts->basic,
295 sid_str = dp_opt_get_string(idmap_ctx->id_ctx->opts->basic, SDAP_IDMAP_DEFAULT_DOMAIN_SID);
297 struct sss_domain_info *domain = idmap_ctx->id_ctx->be->domain;
305 ret = sdap_idmap_add_domain(idmap_ctx, dom_name,
314 if (dp_opt_get_bool(idmap_ctx->id_ctx->opts->basic, SDAP_IDMAP_AUTORID_COMPAT)) {
320 idmap_ctx->id_ctx->opts->basic[SDAP_IDMAP_DEFAULT_DOMAIN_SID].opt_name);
326 *_idmap_ctx = talloc_steal(mem_ctx, idmap_ctx);
335 sdap_idmap_add_domain(struct sdap_idmap_ctx *idmap_ctx,
346 ret = sss_idmap_ctx_get_upper(idmap_ctx->map, &idmap_upper);
354 if (dp_opt_get_bool(idmap_ctx->id_ctx->opts->basic, SDAP_ID_MAPPING)) {
356 ret = sss_idmap_calculate_range(idmap_ctx->map, dom_sid, &slice, &range);
376 ret = sdap_idmap_get_configured_external_range(idmap_ctx, &range);
385 err = sss_idmap_add_auto_domain_ex(idmap_ctx->map, dom_name, dom_sid,
399 ret = sysdb_idmap_store_mapping(idmap_ctx->id_ctx->be->domain,
457 sdap_idmap_sid_to_unix(struct sdap_idmap_ctx *idmap_ctx,
466 err = sss_idmap_sid_to_unix(idmap_ctx->map,
486 ret = idmap_ctx->find_new_domain(idmap_ctx, dom_sid_str, dom_sid_str);
494 err = sss_idmap_sid_to_unix(idmap_ctx->map,