summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-28 01:17:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:25 -0500
commit37d53832a4623653f706e77985a79d84bd7c6694 (patch)
tree265e308027d6641bbdb29a4feddbe86ef8b25fd1 /source4/web_server
parente09226cb35d627affddc08c4a88527184b8ffcf9 (diff)
downloadsamba-37d53832a4623653f706e77985a79d84bd7c6694.tar.gz
samba-37d53832a4623653f706e77985a79d84bd7c6694.tar.bz2
samba-37d53832a4623653f706e77985a79d84bd7c6694.zip
r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/http.c10
-rw-r--r--source4/web_server/web_server.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index d19a26ac0e..77a333f003 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -174,7 +174,7 @@ static int http_readFileFromSwatDir(EspHandle handle,
int *len,
const char *path)
{
- return http_readFile(handle, buf, len, path, lp_swat_directory());
+ return http_readFile(handle, buf, len, path, lp_swat_directory(global_loadparm));
}
@@ -388,7 +388,7 @@ static void http_simple_request(struct websrv_context *web)
const char *path;
struct stat st;
- path = http_local_path(web, url, lp_swat_directory());
+ path = http_local_path(web, url, lp_swat_directory(global_loadparm));
if (path == NULL) goto invalid;
/* looks ok */
@@ -470,7 +470,7 @@ static void http_setup_arrays(struct esp_state *esp)
talloc_asprintf(esp, "%u", socket_address->port));
}
- SETVAR(ESP_SERVER_OBJ, "DOCUMENT_ROOT", lp_swat_directory());
+ SETVAR(ESP_SERVER_OBJ, "DOCUMENT_ROOT", lp_swat_directory(global_loadparm));
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");
@@ -515,7 +515,7 @@ static void esp_request(struct esp_state *esp, const char *url)
int res;
char *emsg = NULL, *buf;
- if (http_readFile(web, &buf, &size, url, lp_swat_directory()) != 0) {
+ if (http_readFile(web, &buf, &size, url, lp_swat_directory(global_loadparm)) != 0) {
http_error_unix(web, url);
return;
}
@@ -547,7 +547,7 @@ static BOOL http_preauth(struct esp_state *esp)
{
const char *path = http_local_path(esp->web,
HTTP_PREAUTH_URI,
- lp_swat_directory());
+ lp_swat_directory(global_loadparm));
int i;
if (path == NULL) {
http_error(esp->web, 500, "Internal server error");
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 221c792f14..2e80339871 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -241,7 +241,7 @@ static const struct stream_server_ops web_stream_ops = {
static void websrv_task_init(struct task_server *task)
{
NTSTATUS status;
- uint16_t port = lp_web_port();
+ uint16_t port = lp_web_port(global_loadparm);
const struct model_ops *model_ops;
task_server_set_title(task, "task[websrv]");
@@ -250,7 +250,7 @@ static void websrv_task_init(struct task_server *task)
model_ops = process_model_byname("single");
if (!model_ops) goto failed;
- if (lp_interfaces() && lp_bind_interfaces_only()) {
+ if (lp_interfaces(global_loadparm) && lp_bind_interfaces_only(global_loadparm)) {
int num_interfaces = iface_count();
int i;
for(i = 0; i < num_interfaces; i++) {
@@ -264,7 +264,7 @@ static void websrv_task_init(struct task_server *task)
} else {
status = stream_setup_socket(task->event_ctx, model_ops,
&web_stream_ops,
- "ipv4", lp_socket_address(),
+ "ipv4", lp_socket_address(global_loadparm),
&port, task);
if (!NT_STATUS_IS_OK(status)) goto failed;
}