Lines Matching refs:secreq
28 typedef int (*url_mapper_fn)(struct sec_req_ctx *secreq,
36 static int sec_map_url_to_user_path(struct sec_req_ctx *secreq,
41 c_euid = client_euid(secreq->cctx->creds);
45 talloc_asprintf(secreq, SEC_BASEPATH"users/%"SPRIuid"/%s",
47 &secreq->parsed_url.path[sizeof(SEC_BASEPATH) - 1]);
59 static int kcm_map_url_to_path(struct sec_req_ctx *secreq,
64 c_euid = client_euid(secreq->cctx->creds);
73 *mapped_path = talloc_strdup(secreq, secreq->parsed_url.path );
91 int sec_req_routing(TALLOC_CTX *mem_ctx, struct sec_req_ctx *secreq,
102 sctx = talloc_get_type(secreq->cctx->rctx->pvt_ctx, struct sec_ctx);
105 if (strncasecmp(secreq->parsed_url.path,
118 secreq->parsed_url.path);
122 ret = mapper_fn(secreq, &secreq->mapped_path);
131 ret = confdb_get_string(secreq->cctx->rctx->cdb, mem_ctx,
139 ret = confdb_get_sub_sections(mem_ctx, secreq->cctx->rctx->cdb,
154 secreq->base_path = talloc_asprintf(secreq, SEC_BASEPATH"%s/", sections[i]);
155 if (!secreq->base_path) return ENOMEM;
156 slen = strlen(secreq->base_path);
161 if (strncmp(secreq->base_path, secreq->mapped_path, slen) == 0) {
169 ret = confdb_get_string(secreq->cctx->rctx->cdb, mem_ctx,
178 secreq->cfg_section = talloc_steal(secreq, secname);
179 if (!secreq->cfg_section) return ENOMEM;
182 talloc_zfree(secreq->base_path);
185 if (!secreq->base_path) secreq->base_path = SEC_BASEPATH;
188 "Request base path is [%s]\n", secreq->base_path);