const char *path,
const char *base_dir)
{
- struct websrv_context *web = talloc_get_type(handle, struct websrv_context);
+ struct websrv_context *web = talloc_get_type(handle,
+ struct websrv_context);
int fd = -1;
struct stat st;
*buf = NULL;
return -1;
}
-static int http_readFileFromSwatDir(EspHandle handle,
- char **buf,
- int *len,
+static int http_readFileFromSwatDir(EspHandle handle, char **buf, int *len,
const char *path)
{
- return http_readFile(handle, buf, len, path, lp_swat_directory(global_loadparm));
+ return http_readFile(handle, buf, len, path,
+ lp_swat_directory(global_loadparm));
}
const char *path;
struct stat st;
- path = http_local_path(web, url, lp_swat_directory(global_loadparm));
+ path = http_local_path(web, url, lp_swat_directory(web->task->lp_ctx));
if (path == NULL) goto invalid;
/* looks ok */
talloc_asprintf(esp, "%u", socket_address->port));
}
- SETVAR(ESP_SERVER_OBJ, "DOCUMENT_ROOT", lp_swat_directory(global_loadparm));
+ SETVAR(ESP_SERVER_OBJ, "DOCUMENT_ROOT", lp_swat_directory(esp->web->task->lp_ctx));
SETVAR(ESP_SERVER_OBJ, "SERVER_PROTOCOL", tls_enabled(web->conn->socket)?"https":"http");
SETVAR(ESP_SERVER_OBJ, "SERVER_SOFTWARE", "SAMBA");
SETVAR(ESP_SERVER_OBJ, "GATEWAY_INTERFACE", "CGI/1.1");
int res;
char *emsg = NULL, *buf;
- if (http_readFile(web, &buf, &size, url, lp_swat_directory(global_loadparm)) != 0) {
+ if (http_readFile(web, &buf, &size, url, lp_swat_directory(esp->web->task->lp_ctx)) != 0) {
http_error_unix(web, url);
return;
}
{
const char *path = http_local_path(esp->web,
HTTP_PREAUTH_URI,
- lp_swat_directory(global_loadparm));
+ lp_swat_directory(esp->web->task->lp_ctx));
int i;
if (path == NULL) {
http_error(esp->web, 500, "Internal server error");
s->data = NULL;
s->te = NULL;
s->edata = edata;
- s->lifetime = lp_parm_int(global_loadparm, NULL, "web", "sessiontimeout", 900);
+ s->lifetime = lp_parm_int(esp->web->task->lp_ctx, NULL, "web", "sessiontimeout", 900);
DLIST_ADD(edata->sessions, s);
talloc_set_destructor(s, session_destructor);
if (!generated_key) {
task->private = edata;
- edata->tls_params = tls_initialise(edata);
+ edata->tls_params = tls_initialise(edata, task->lp_ctx);
NT_STATUS_HAVE_NO_MEMORY(edata->tls_params);
return NT_STATUS_OK;