void *private_data;
- /*
- * idmap config settings, used to tell the idmap child which
- * special domain config to use for a mapping
- */
- bool have_idmap_config;
- uint32_t id_range_low, id_range_high;
-
/* A working DC */
pid_t dc_probe_pid; /* Child we're using to detect the DC. */
char *dcname;
{
struct winbindd_domain *domain;
const char *alternative_name = NULL;
- char *idmap_config_option;
- const char *param;
const char **ignored_domains, **dom;
int role = lp_server_role();
wcache_tdc_add_domain( domain );
- idmap_config_option = talloc_asprintf(talloc_tos(), "idmap config %s",
- domain->name);
- if (idmap_config_option == NULL) {
- DEBUG(0, ("talloc failed, not looking for idmap config\n"));
- goto done;
- }
-
- param = lp_parm_const_string(-1, idmap_config_option, "range", NULL);
-
- DEBUG(10, ("%s : range = %s\n", idmap_config_option,
- param ? param : "not defined"));
-
- if (param != NULL) {
- unsigned low_id, high_id;
- if (sscanf(param, "%u - %u", &low_id, &high_id) != 2) {
- DEBUG(1, ("invalid range syntax in %s: %s\n",
- idmap_config_option, param));
- goto done;
- }
- if (low_id > high_id) {
- DEBUG(1, ("invalid range in %s: %s\n",
- idmap_config_option, param));
- goto done;
- }
- domain->have_idmap_config = true;
- domain->id_range_low = low_id;
- domain->id_range_high = high_id;
- }
-
-done:
-
setup_domain_child(domain);
DEBUG(2,("Added domain %s %s %s\n",