Lines Matching refs:secreq
27 static int sec_map_url_to_user_path(struct sec_req_ctx *secreq,
32 c_euid = client_euid(secreq->cctx->creds);
36 talloc_asprintf(secreq, SEC_BASEPATH"users/%"SPRIuid"/%s",
38 &secreq->parsed_url.path[sizeof(SEC_BASEPATH) - 1]);
49 int sec_req_routing(TALLOC_CTX *mem_ctx, struct sec_req_ctx *secreq,
59 sctx = talloc_get_type(secreq->cctx->rctx->pvt_ctx, struct sec_ctx);
62 ret = strncasecmp(secreq->parsed_url.path,
67 secreq->parsed_url.path);
71 ret = sec_map_url_to_user_path(secreq, &secreq->mapped_path);
75 ret = confdb_get_string(secreq->cctx->rctx->cdb, mem_ctx,
83 ret = confdb_get_sub_sections(mem_ctx, secreq->cctx->rctx->cdb,
98 secreq->base_path = talloc_asprintf(secreq, SEC_BASEPATH"%s/", sections[i]);
99 if (!secreq->base_path) return ENOMEM;
100 slen = strlen(secreq->base_path);
105 if (strncmp(secreq->base_path, secreq->mapped_path, slen) == 0) {
113 ret = confdb_get_string(secreq->cctx->rctx->cdb, mem_ctx,
122 secreq->cfg_section = talloc_steal(secreq, secname);
123 if (!secreq->cfg_section) return ENOMEM;
126 talloc_zfree(secreq->base_path);
129 if (!secreq->base_path) secreq->base_path = SEC_BASEPATH;
132 "Request base path is [%s]\n", secreq->base_path);