Lines Matching defs:ctx
63 static int check_parsed_template(struct sss_certmap_ctx *ctx,
109 static int parse_template(TALLOC_CTX *mem_ctx, struct sss_certmap_ctx *ctx,
129 CM_DEBUG(ctx, "Only one '.' allowed in template.");
135 CM_DEBUG(ctx, "Missing name in template.");
145 CM_DEBUG(ctx, "Only one '!' allowed in template.");
151 CM_DEBUG(ctx, "Missing name in template.");
160 CM_DEBUG(ctx, "Memory allocation failed.");
174 CM_DEBUG(ctx, "Memory allocation failed.");
192 ret = check_parsed_template(ctx, parsed);
194 CM_DEBUG(ctx, "Parse template invalid.");
210 static int add_comp(struct sss_certmap_ctx *ctx, struct ldap_mapping_rule *rule,
229 ret = parse_template(comp, ctx, string, &comp->parsed_template);
241 static int add_string(struct sss_certmap_ctx *ctx,
244 return add_comp(ctx, rule, string, comp_string);
247 static int add_template(struct sss_certmap_ctx *ctx,
250 return add_comp(ctx, rule, string, comp_template);
253 int parse_ldap_mapping_rule(struct sss_certmap_ctx *ctx,
265 rule = talloc_zero(ctx, struct ldap_mapping_rule);
272 tmp_string = talloc_zero_size(ctx, tmp_string_size);
283 CM_DEBUG(ctx, "Cannot parse mapping rule.");
290 CM_DEBUG(ctx, "'{' not allowed in templates.");
301 ret = add_string(ctx, rule, tmp_string);
303 CM_DEBUG(ctx, "Failed to add string.");
317 CM_DEBUG(ctx, "'}}' not allowed in templates.");
327 ret = add_template(ctx, rule, tmp_string);
329 CM_DEBUG(ctx, "Failed to add template.");
346 CM_DEBUG(ctx, "Rule ended inside template.");
351 ret = add_string(ctx, rule, tmp_string);
353 CM_DEBUG(ctx, "Failed to add string.");