Lines Matching defs:target

42     struct dp_target *target;
54 target = provider->targets[type];
55 if (target == NULL || target->module_name == NULL) {
56 DEBUG(SSSDBG_MINOR_FAILURE, "Uninitialized target %s\n",
66 if (strcmp(target->module_name, module_name) == 0) {
78 enum dp_targets target)
84 if (target >= DP_TARGET_SENTINEL || provider->targets[target] == NULL) {
88 return provider->targets[target]->module;
96 const char *dp_target_to_string(enum dp_targets target)
98 switch (target) {
146 enum dp_targets target)
148 switch (target) {
162 static errno_t dp_target_run_constructor(struct dp_target *target,
170 fn_name = talloc_asprintf(target, DP_TARGET_INIT_FN,
171 target->module->name, target->name);
178 fn = (dp_target_init_fn)dlsym(target->module->libhandle, fn_name);
180 DEBUG(SSSDBG_TRACE_FUNC, "Executing target [%s] constructor\n",
181 target->name);
183 ret = fn(target, be_ctx, target->module->module_data, target->methods);
186 "[%d]: %s\n", target->name, ret, sss_strerror(ret));
191 if (error == NULL || !target->explicitly_configured) {
197 DEBUG(SSSDBG_FATAL_FAILURE, "Unable to load target [%s] "
198 "constructor: %s\n", target->name, error);
204 target->initialized = true;
213 struct dp_target *target,
218 target->name);
219 target->initialized = false;
220 target->module = NULL;
224 if (target->target == DPT_ACCESS) {
226 dp_set_method(target->methods, DPM_ACCESS_HANDLER,
229 target->module = NULL;
230 target->initialized = true;
235 dp_set_method(target->methods, DPM_ACCESS_HANDLER,
238 target->module = NULL;
239 target->initialized = true;
250 struct dp_target *target)
254 DEBUG(SSSDBG_TRACE_FUNC, "Initializing target [%s] with module [%s]\n",
255 target->name, target->module_name);
257 /* We have already name, module name and target set. We just load
260 target->methods = talloc_zero_array(target, struct dp_method,
262 if (target->methods == NULL) {
269 ret = dp_target_special(be_ctx, target, target->module_name);
274 /* Load module first. Memory context is modules, not target here. */
275 target->module = dp_load_module(modules, be_ctx, provider, modules,
276 target->module_name);
277 if (target->module == NULL) {
279 target->module_name);
285 ret = dp_target_run_constructor(target, be_ctx);
286 if (!target->explicitly_configured && (ret == ELIBBAD || ret == ENOTSUP)) {
290 "module [%s].\n", target->name, target->module_name);
301 talloc_free(target->methods);
381 targets[type]->target = type;
399 /* We load the configuration first and store module name to each target.
413 DEBUG(SSSDBG_CRIT_FAILURE, "Unable to load target [%s] "
437 * all private data are attached to the target they belong to. */