git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01c7909
)
r26672: Janitorial: Remove uses of global_loadparm.
author
Jelmer Vernooij
<jelmer@samba.org>
Sun, 6 Jan 2008 01:03:43 +0000
(19:03 -0600)
committer
Stefan Metzmacher
<metze@samba.org>
Sat, 5 Jan 2008 19:06:03 +0000
(13:06 -0600)
(This used to be commit
18cd08623eaad7d2cd63b82ea5275d4dfd21cf00
)
23 files changed:
source4/cldap_server/cldap_server.c
patch
|
blob
|
history
source4/dsdb/repl/drepl_service.c
patch
|
blob
|
history
source4/kdc/kdc.c
patch
|
blob
|
history
source4/ldap_server/ldap_server.c
patch
|
blob
|
history
source4/nbt_server/nbt_server.c
patch
|
blob
|
history
source4/ntvfs/ipc/ipc_rap.c
patch
|
blob
|
history
source4/ntvfs/ipc/rap_server.c
patch
|
blob
|
history
source4/ntvfs/ipc/vfs_ipc.c
patch
|
blob
|
history
source4/ntvfs/sysdep/sys_notify.c
patch
|
blob
|
history
source4/rpc_server/service_rpc.c
patch
|
blob
|
history
source4/smb_server/smb2/fileio.c
patch
|
blob
|
history
source4/smb_server/smb_server.c
patch
|
blob
|
history
source4/smbd/process_model.h
patch
|
blob
|
history
source4/smbd/process_single.c
patch
|
blob
|
history
source4/smbd/process_standard.c
patch
|
blob
|
history
source4/smbd/process_thread.c
patch
|
blob
|
history
source4/smbd/service_stream.c
patch
|
blob
|
history
source4/smbd/service_task.c
patch
|
blob
|
history
source4/torture/util_smb.c
patch
|
blob
|
history
source4/web_server/web_server.c
patch
|
blob
|
history
source4/winbind/wb_server.c
patch
|
blob
|
history
source4/wrepl_server/wrepl_in_connection.c
patch
|
blob
|
history
source4/wrepl_server/wrepl_server.c
patch
|
blob
|
history
diff --git
a/source4/cldap_server/cldap_server.c
b/source4/cldap_server/cldap_server.c
index 47597ff1dbf80ece9972093218cc7db9368d1e23..d68637104db3b5eea582e7d9053dbd8e7dacb78a 100644
(file)
--- a/
source4/cldap_server/cldap_server.c
+++ b/
source4/cldap_server/cldap_server.c
@@
-209,7
+209,7
@@
static void cldapd_task_init(struct task_server *task)
*/
static NTSTATUS cldapd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
{
*/
static NTSTATUS cldapd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
{
- return task_server_startup(event_ctx, model_ops, cldapd_task_init);
+ return task_server_startup(event_ctx,
lp_ctx,
model_ops, cldapd_task_init);
}
}
diff --git
a/source4/dsdb/repl/drepl_service.c
b/source4/dsdb/repl/drepl_service.c
index c3238a206f26ef4af1232eda58591eccafa002e2..e212407e2406483920b15bee9b6a8b9cdddf9a2e 100644
(file)
--- a/
source4/dsdb/repl/drepl_service.c
+++ b/
source4/dsdb/repl/drepl_service.c
@@
-185,7
+185,7
@@
static void dreplsrv_task_init(struct task_server *task)
*/
static NTSTATUS dreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
{
*/
static NTSTATUS dreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
{
- return task_server_startup(event_ctx, model_ops, dreplsrv_task_init);
+ return task_server_startup(event_ctx,
lp_ctx,
model_ops, dreplsrv_task_init);
}
/*
}
/*
diff --git
a/source4/kdc/kdc.c
b/source4/kdc/kdc.c
index 5c8b2afe0fceb24fca340c45ad1fb2a00eb9c526..04e7ddd2ff1ceef58087fdb89f9333936366c76f 100644
(file)
--- a/
source4/kdc/kdc.c
+++ b/
source4/kdc/kdc.c
@@
-489,7
+489,9
@@
static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address,
return NT_STATUS_INTERNAL_ERROR;
}
return NT_STATUS_INTERNAL_ERROR;
}
- status = stream_setup_socket(kdc->task->event_ctx, model_ops,
+ status = stream_setup_socket(kdc->task->event_ctx,
+ kdc->task->lp_ctx,
+ model_ops,
&kdc_tcp_stream_ops,
"ip", address, &kdc_port,
lp_socket_options(kdc->task->lp_ctx),
&kdc_tcp_stream_ops,
"ip", address, &kdc_port,
lp_socket_options(kdc->task->lp_ctx),
@@
-501,7
+503,9
@@
static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address,
return status;
}
return status;
}
- status = stream_setup_socket(kdc->task->event_ctx, model_ops,
+ status = stream_setup_socket(kdc->task->event_ctx,
+ kdc->task->lp_ctx,
+ model_ops,
&kpasswdd_tcp_stream_ops,
"ip", address, &kpasswd_port,
lp_socket_options(kdc->task->lp_ctx),
&kpasswdd_tcp_stream_ops,
"ip", address, &kpasswd_port,
lp_socket_options(kdc->task->lp_ctx),
@@
-663,7
+667,7
@@
static NTSTATUS kdc_init(struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
- return task_server_startup(event_ctx, model_ops, kdc_task_init);
+ return task_server_startup(event_ctx,
lp_ctx,
model_ops, kdc_task_init);
}
/* called at smbd startup - register ourselves as a server service */
}
/* called at smbd startup - register ourselves as a server service */
diff --git
a/source4/ldap_server/ldap_server.c
b/source4/ldap_server/ldap_server.c
index c7b1099166eacfe2c79ce99ebd8842edb539e8f1..fcc9435ead11a0ab65eb11b0879a261db754a5b2 100644
(file)
--- a/
source4/ldap_server/ldap_server.c
+++ b/
source4/ldap_server/ldap_server.c
@@
-449,7
+449,8
@@
static NTSTATUS add_socket(struct event_context *event_context,
NTSTATUS status;
struct ldb_context *ldb;
NTSTATUS status;
struct ldb_context *ldb;
- status = stream_setup_socket(event_context, model_ops, &ldap_stream_ops,
+ status = stream_setup_socket(event_context, lp_ctx,
+ model_ops, &ldap_stream_ops,
"ipv4", address, &port,
lp_socket_options(lp_ctx),
ldap_service);
"ipv4", address, &port,
lp_socket_options(lp_ctx),
ldap_service);
@@
-461,7
+462,8
@@
static NTSTATUS add_socket(struct event_context *event_context,
if (tls_support(ldap_service->tls_params)) {
/* add ldaps server */
port = 636;
if (tls_support(ldap_service->tls_params)) {
/* add ldaps server */
port = 636;
- status = stream_setup_socket(event_context, model_ops, &ldap_stream_ops,
+ status = stream_setup_socket(event_context, lp_ctx,
+ model_ops, &ldap_stream_ops,
"ipv4", address, &port,
lp_socket_options(lp_ctx),
ldap_service);
"ipv4", address, &port,
lp_socket_options(lp_ctx),
ldap_service);
@@
-479,7
+481,8
@@
static NTSTATUS add_socket(struct event_context *event_context,
if (samdb_is_gc(ldb)) {
port = 3268;
if (samdb_is_gc(ldb)) {
port = 3268;
- status = stream_setup_socket(event_context, model_ops, &ldap_stream_ops,
+ status = stream_setup_socket(event_context, lp_ctx,
+ model_ops, &ldap_stream_ops,
"ipv4", address, &port,
lp_socket_options(lp_ctx),
ldap_service);
"ipv4", address, &port,
lp_socket_options(lp_ctx),
ldap_service);
@@
-556,7
+559,8
@@
static void ldapsrv_task_init(struct task_server *task)
goto failed;
}
goto failed;
}
- status = stream_setup_socket(task->event_ctx, model_ops, &ldap_stream_ops,
+ status = stream_setup_socket(task->event_ctx, task->lp_ctx,
+ model_ops, &ldap_stream_ops,
"unix", ldapi_path, NULL,
lp_socket_options(task->lp_ctx),
ldap_service);
"unix", ldapi_path, NULL,
lp_socket_options(task->lp_ctx),
ldap_service);
@@
-580,7
+584,8
@@
static NTSTATUS ldapsrv_init(struct event_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
- return task_server_startup(event_context, model_ops, ldapsrv_task_init);
+ return task_server_startup(event_context, lp_ctx, model_ops,
+ ldapsrv_task_init);
}
}
diff --git
a/source4/nbt_server/nbt_server.c
b/source4/nbt_server/nbt_server.c
index c7fb3b286a447ba12a805fe86b70b06c0588a42a..1718ef7f2e0e1788b0fc6bbf94453b4e96f557eb 100644
(file)
--- a/
source4/nbt_server/nbt_server.c
+++ b/
source4/nbt_server/nbt_server.c
@@
-93,7
+93,8
@@
static void nbtd_task_init(struct task_server *task)
*/
static NTSTATUS nbtd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
{
*/
static NTSTATUS nbtd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
{
- return task_server_startup(event_ctx, model_ops, nbtd_task_init);
+ return task_server_startup(event_ctx, lp_ctx,
+ model_ops, nbtd_task_init);
}
}
diff --git
a/source4/ntvfs/ipc/ipc_rap.c
b/source4/ntvfs/ipc/ipc_rap.c
index 85bc5c212f7253959956c11d6dc9ad06e3dd9aa5..faf48705c466cc27630c809fe755de68e33939f5 100644
(file)
--- a/
source4/ntvfs/ipc/ipc_rap.c
+++ b/
source4/ntvfs/ipc/ipc_rap.c
@@
-82,6
+82,8
@@
static void rap_heap_restore(struct rap_string_heap *heap,
}
struct rap_call {
}
struct rap_call {
+ struct loadparm_context *lp_ctx;
+
TALLOC_CTX *mem_ctx;
uint16_t callno;
const char *paramdesc;
TALLOC_CTX *mem_ctx;
uint16_t callno;
const char *paramdesc;
@@
-103,6
+105,7
@@
struct rap_call {
#define RAPNDR_FLAGS (LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
#define RAPNDR_FLAGS (LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
struct smb_trans2 *trans)
{
struct rap_call *call;
struct smb_trans2 *trans)
{
struct rap_call *call;
@@
-114,12
+117,14
@@
static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
ZERO_STRUCTP(call);
ZERO_STRUCTP(call);
+ call->lp_ctx = talloc_reference(call, lp_ctx);
+
call->mem_ctx = mem_ctx;
call->mem_ctx = mem_ctx;
- call->ndr_pull_param = ndr_pull_init_blob(&trans->in.params, mem_ctx, lp_iconv_convenience(
global_loadparm
));
+ call->ndr_pull_param = ndr_pull_init_blob(&trans->in.params, mem_ctx, lp_iconv_convenience(
lp_ctx
));
call->ndr_pull_param->flags = RAPNDR_FLAGS;
call->ndr_pull_param->flags = RAPNDR_FLAGS;
- call->ndr_pull_data = ndr_pull_init_blob(&trans->in.data, mem_ctx, lp_iconv_convenience(
global_loadparm
));
+ call->ndr_pull_data = ndr_pull_init_blob(&trans->in.data, mem_ctx, lp_iconv_convenience(
lp_ctx
));
call->ndr_pull_data->flags = RAPNDR_FLAGS;
call->heap = talloc(mem_ctx, struct rap_string_heap);
call->ndr_pull_data->flags = RAPNDR_FLAGS;
call->heap = talloc(mem_ctx, struct rap_string_heap);
@@
-266,7
+271,7
@@
static NTSTATUS _rap_netshareenum(struct rap_call *call)
break;
}
break;
}
- result = rap_netshareenum(call, &r);
+ result = rap_netshareenum(call,
call->lp_ctx,
&r);
if (!NT_STATUS_IS_OK(result))
return result;
if (!NT_STATUS_IS_OK(result))
return result;
@@
-348,7
+353,7
@@
static NTSTATUS _rap_netserverenum2(struct rap_call *call)
break;
}
break;
}
- result = rap_netserverenum2(call, &r);
+ result = rap_netserverenum2(call,
call->lp_ctx,
&r);
if (!NT_STATUS_IS_OK(result))
return result;
if (!NT_STATUS_IS_OK(result))
return result;
@@
-425,7
+430,8
@@
static const struct
{NULL, -1, api_Unsupported}
};
{NULL, -1, api_Unsupported}
};
-NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
+NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+ struct smb_trans2 *trans)
{
int i;
NTSTATUS result;
{
int i;
NTSTATUS result;
@@
-434,7
+440,7
@@
NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
struct ndr_push *final_param;
struct ndr_push *final_data;
struct ndr_push *final_param;
struct ndr_push *final_data;
- call = new_rap_srv_call(mem_ctx, trans);
+ call = new_rap_srv_call(mem_ctx,
lp_ctx,
trans);
if (call == NULL)
return NT_STATUS_NO_MEMORY;
if (call == NULL)
return NT_STATUS_NO_MEMORY;
@@
-445,8
+451,8
@@
NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
NDR_RETURN(ndr_pull_string(call->ndr_pull_param, NDR_SCALARS,
&call->datadesc));
NDR_RETURN(ndr_pull_string(call->ndr_pull_param, NDR_SCALARS,
&call->datadesc));
- call->ndr_push_param = ndr_push_init_ctx(call, lp_iconv_convenience(
global_loadparm
));
- call->ndr_push_data = ndr_push_init_ctx(call, lp_iconv_convenience(
global_loadparm
));
+ call->ndr_push_param = ndr_push_init_ctx(call, lp_iconv_convenience(
lp_ctx
));
+ call->ndr_push_data = ndr_push_init_ctx(call, lp_iconv_convenience(
lp_ctx
));
if ((call->ndr_push_param == NULL) || (call->ndr_push_data == NULL))
return NT_STATUS_NO_MEMORY;
if ((call->ndr_push_param == NULL) || (call->ndr_push_data == NULL))
return NT_STATUS_NO_MEMORY;
@@
-471,8
+477,8
@@
NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
result_param = ndr_push_blob(call->ndr_push_param);
result_data = ndr_push_blob(call->ndr_push_data);
result_param = ndr_push_blob(call->ndr_push_param);
result_data = ndr_push_blob(call->ndr_push_data);
- final_param = ndr_push_init_ctx(call, lp_iconv_convenience(
global_loadparm
));
- final_data = ndr_push_init_ctx(call, lp_iconv_convenience(
global_loadparm
));
+ final_param = ndr_push_init_ctx(call, lp_iconv_convenience(
lp_ctx
));
+ final_data = ndr_push_init_ctx(call, lp_iconv_convenience(
lp_ctx
));
if ((final_param == NULL) || (final_data == NULL))
return NT_STATUS_NO_MEMORY;
if ((final_param == NULL) || (final_data == NULL))
return NT_STATUS_NO_MEMORY;
diff --git
a/source4/ntvfs/ipc/rap_server.c
b/source4/ntvfs/ipc/rap_server.c
index 7d3020a2590c86c61bcd4904a042230c1f712aa8..633f0bf36e3abb7d27a14db55da2fa2bd0204712 100644
(file)
--- a/
source4/ntvfs/ipc/rap_server.c
+++ b/
source4/ntvfs/ipc/rap_server.c
@@
-29,6
+29,7
@@
* idea. */
NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
* idea. */
NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
struct rap_NetShareEnum *r)
{
NTSTATUS nterr;
struct rap_NetShareEnum *r)
{
NTSTATUS nterr;
@@
-41,7
+42,7
@@
NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
r->out.available = 0;
r->out.info = NULL;
r->out.available = 0;
r->out.info = NULL;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(
global_loadparm), global_loadparm
, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(
lp_ctx), lp_ctx
, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return nterr;
}
if (!NT_STATUS_IS_OK(nterr)) {
return nterr;
}
@@
-75,6
+76,7
@@
NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
}
NTSTATUS rap_netserverenum2(TALLOC_CTX *mem_ctx,
}
NTSTATUS rap_netserverenum2(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
struct rap_NetServerEnum2 *r)
{
r->out.status = 0;
struct rap_NetServerEnum2 *r)
{
r->out.status = 0;
diff --git
a/source4/ntvfs/ipc/vfs_ipc.c
b/source4/ntvfs/ipc/vfs_ipc.c
index b69fb98c5d60a3b5db6a721a602586ab29346edf..81cd984f0b5e9230b6a8eff4edc34e631a7c3b9b 100644
(file)
--- a/
source4/ntvfs/ipc/vfs_ipc.c
+++ b/
source4/ntvfs/ipc/vfs_ipc.c
@@
-805,7
+805,7
@@
static NTSTATUS ipc_trans(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
if (strequal(trans->in.trans_name, "\\PIPE\\LANMAN"))
NTSTATUS status;
if (strequal(trans->in.trans_name, "\\PIPE\\LANMAN"))
- return ipc_rap_call(req, trans);
+ return ipc_rap_call(req,
ntvfs->ctx->lp_ctx,
trans);
if (trans->in.setup_count != 2) {
return NT_STATUS_INVALID_PARAMETER;
if (trans->in.setup_count != 2) {
return NT_STATUS_INVALID_PARAMETER;
diff --git
a/source4/ntvfs/sysdep/sys_notify.c
b/source4/ntvfs/sysdep/sys_notify.c
index 2ed9908af7c4d23cd7aae754d748b3b1c330c797..84ba745f5be15c3e4736ae59207c484671c37364 100644
(file)
--- a/
source4/ntvfs/sysdep/sys_notify.c
+++ b/
source4/ntvfs/sysdep/sys_notify.c
@@
-126,17
+126,11
@@
_PUBLIC_ NTSTATUS sys_notify_init(void)
static bool initialized = false;
init_module_fn static_init[] = { STATIC_sys_notify_MODULES };
static bool initialized = false;
init_module_fn static_init[] = { STATIC_sys_notify_MODULES };
- init_module_fn *shared_init;
if (initialized) return NT_STATUS_OK;
initialized = true;
if (initialized) return NT_STATUS_OK;
initialized = true;
- shared_init = load_samba_modules(NULL, global_loadparm, "sys_notify");
-
run_init_functions(static_init);
run_init_functions(static_init);
- run_init_functions(shared_init);
-
- talloc_free(shared_init);
return NT_STATUS_OK;
}
return NT_STATUS_OK;
}
diff --git
a/source4/rpc_server/service_rpc.c
b/source4/rpc_server/service_rpc.c
index 46b869ad7123b38bfa69f52e2c1dc67d15d04cfc..46916135f9a4799e6f53739910657eb791ae0869 100644
(file)
--- a/
source4/rpc_server/service_rpc.c
+++ b/
source4/rpc_server/service_rpc.c
@@
-232,7
+232,8
@@
static NTSTATUS dcesrv_add_ep_unix(struct dcesrv_context *dce_ctx,
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops,
+ status = stream_setup_socket(event_ctx, lp_ctx,
+ model_ops, &dcesrv_stream_ops,
"unix", e->ep_description->endpoint, &port,
lp_socket_options(lp_ctx),
dcesrv_sock);
"unix", e->ep_description->endpoint, &port,
lp_socket_options(lp_ctx),
dcesrv_sock);
@@
-271,7
+272,8
@@
static NTSTATUS dcesrv_add_ep_ncalrpc(struct dcesrv_context *dce_ctx,
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops,
+ status = stream_setup_socket(event_ctx, lp_ctx,
+ model_ops, &dcesrv_stream_ops,
"unix", full_path, &port,
lp_socket_options(lp_ctx),
dcesrv_sock);
"unix", full_path, &port,
lp_socket_options(lp_ctx),
dcesrv_sock);
@@
-352,7
+354,8
@@
static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops,
+ status = stream_setup_socket(event_ctx, dce_ctx->lp_ctx,
+ model_ops, &dcesrv_stream_ops,
"ipv4", address, &port,
lp_socket_options(dce_ctx->lp_ctx),
dcesrv_sock);
"ipv4", address, &port,
lp_socket_options(dce_ctx->lp_ctx),
dcesrv_sock);
@@
-462,7
+465,8
@@
static NTSTATUS dcesrv_init(struct event_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
- return task_server_startup(event_context, model_ops, dcesrv_task_init);
+ return task_server_startup(event_context, lp_ctx,
+ model_ops, dcesrv_task_init);
}
NTSTATUS server_service_rpc_init(void)
}
NTSTATUS server_service_rpc_init(void)
diff --git
a/source4/smb_server/smb2/fileio.c
b/source4/smb_server/smb2/fileio.c
index e853743b2f6612f349ae916b63b6fa90a3092b45..0e83c786152103becaa22f85fe1625e159fdd387 100644
(file)
--- a/
source4/smb_server/smb2/fileio.c
+++ b/
source4/smb_server/smb2/fileio.c
@@
-353,7
+353,7
@@
static void smb2srv_notify_send(struct ntvfs_request *ntvfs)
ssize_t len;
SIVAL(p, 4, io->smb2.out.changes[i].action);
ssize_t len;
SIVAL(p, 4, io->smb2.out.changes[i].action);
- len = push_string(lp_iconv_convenience(
global_loadparm
), p + 12, io->smb2.out.changes[i].name.s,
+ len = push_string(lp_iconv_convenience(
ntvfs->ctx->lp_ctx
), p + 12, io->smb2.out.changes[i].name.s,
blob.length - (p+12 - blob.data), STR_UNICODE);
SIVAL(p, 8, len);
blob.length - (p+12 - blob.data), STR_UNICODE);
SIVAL(p, 8, len);
diff --git
a/source4/smb_server/smb_server.c
b/source4/smb_server/smb_server.c
index 082de6540b28bf0f08364ed3c3e0341946878501..cbff585e21af8b91bf45f0567d95b262093a7d57 100644
(file)
--- a/
source4/smb_server/smb_server.c
+++ b/
source4/smb_server/smb_server.c
@@
-185,7
+185,8
@@
_PUBLIC_ NTSTATUS smbsrv_add_socket(struct event_context *event_context,
for (i=0;ports[i];i++) {
uint16_t port = atoi(ports[i]);
if (port == 0) continue;
for (i=0;ports[i];i++) {
uint16_t port = atoi(ports[i]);
if (port == 0) continue;
- status = stream_setup_socket(event_context, model_ops, &smb_stream_ops,
+ status = stream_setup_socket(event_context, lp_ctx,
+ model_ops, &smb_stream_ops,
"ipv4", address, &port,
lp_socket_options(lp_ctx),
NULL);
"ipv4", address, &port,
lp_socket_options(lp_ctx),
NULL);
@@
-257,7
+258,8
@@
static NTSTATUS smbsrv_init(struct event_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
- return task_server_startup(event_context, model_ops, smbsrv_task_init);
+ return task_server_startup(event_context, lp_ctx,
+ model_ops, smbsrv_task_init);
}
/* called at smbd startup - register ourselves as a server service */
}
/* called at smbd startup - register ourselves as a server service */
diff --git
a/source4/smbd/process_model.h
b/source4/smbd/process_model.h
index 19212606c1c1bb47427197b9db9c102c095b14c2..c2a5c9e9e89850ea39d1dd90a0a8cf9159dad514 100644
(file)
--- a/
source4/smbd/process_model.h
+++ b/
source4/smbd/process_model.h
@@
-44,14
+44,21
@@
struct model_ops {
void (*model_init)(struct event_context *);
/* function to accept new connection */
void (*model_init)(struct event_context *);
/* function to accept new connection */
- void (*accept_connection)(struct event_context *, struct socket_context *,
- void (*)(struct event_context *, struct socket_context *,
+ void (*accept_connection)(struct event_context *,
+ struct loadparm_context *,
+ struct socket_context *,
+ void (*)(struct event_context *,
+ struct loadparm_context *,
+ struct socket_context *,
struct server_id , void *),
void *);
/* function to create a task */
void (*new_task)(struct event_context *,
struct server_id , void *),
void *);
/* function to create a task */
void (*new_task)(struct event_context *,
- void (*)(struct event_context *, struct server_id, void *),
+ struct loadparm_context *lp_ctx,
+ void (*)(struct event_context *,
+ struct loadparm_context *, struct server_id,
+ void *),
void *);
/* function to terminate a connection or task */
void *);
/* function to terminate a connection or task */
diff --git
a/source4/smbd/process_single.c
b/source4/smbd/process_single.c
index 5ba2c8df887239b40d17b0651fe442688a6b9f11..5d3c36adb9faf67cc5364898513eb90f3cc4da5a 100644
(file)
--- a/
source4/smbd/process_single.c
+++ b/
source4/smbd/process_single.c
@@
-37,8
+37,11
@@
static void single_model_init(struct event_context *ev)
called when a listening socket becomes readable.
*/
static void single_accept_connection(struct event_context *ev,
called when a listening socket becomes readable.
*/
static void single_accept_connection(struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct socket_context *sock,
struct socket_context *sock,
- void (*new_conn)(struct event_context *, struct socket_context *,
+ void (*new_conn)(struct event_context *,
+ struct loadparm_context *,
+ struct socket_context *,
struct server_id , void *),
void *private)
{
struct server_id , void *),
void *private)
{
@@
-61,18
+64,19
@@
static void single_accept_connection(struct event_context *ev,
talloc_steal(private, sock);
talloc_steal(private, sock);
- new_conn(ev, sock2, cluster_id(socket_get_fd(sock2)), private);
+ new_conn(ev,
lp_ctx,
sock2, cluster_id(socket_get_fd(sock2)), private);
}
/*
called to startup a new task
*/
static void single_new_task(struct event_context *ev,
}
/*
called to startup a new task
*/
static void single_new_task(struct event_context *ev,
- void (*new_task)(struct event_context *, struct server_id, void *),
+ struct loadparm_context *lp_ctx,
+ void (*new_task)(struct event_context *, struct loadparm_context *, struct server_id, void *),
void *private)
{
static uint32_t taskid = 0x10000000;
void *private)
{
static uint32_t taskid = 0x10000000;
- new_task(ev, cluster_id(taskid++), private);
+ new_task(ev,
lp_ctx,
cluster_id(taskid++), private);
}
}
diff --git
a/source4/smbd/process_standard.c
b/source4/smbd/process_standard.c
index 09d32d05aa39d7716d3ee0ef2ebb7338e0cc0e87..c088ea3b1a3a5b9c29b9cb1ff731c8ee3b6c3561 100644
(file)
--- a/
source4/smbd/process_standard.c
+++ b/
source4/smbd/process_standard.c
@@
-56,8
+56,10
@@
static void standard_model_init(struct event_context *ev)
called when a listening socket becomes readable.
*/
static void standard_accept_connection(struct event_context *ev,
called when a listening socket becomes readable.
*/
static void standard_accept_connection(struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct socket_context *sock,
struct socket_context *sock,
- void (*new_conn)(struct event_context *, struct socket_context *,
+ void (*new_conn)(struct event_context *,
+ struct loadparm_context *, struct socket_context *,
struct server_id , void *),
void *private)
{
struct server_id , void *),
void *private)
{
@@
-126,7
+128,7
@@
static void standard_accept_connection(struct event_context *ev,
talloc_free(s);
/* setup this new connection */
talloc_free(s);
/* setup this new connection */
- new_conn(ev2, sock2, cluster_id(pid), private);
+ new_conn(ev2,
lp_ctx,
sock2, cluster_id(pid), private);
/* we can't return to the top level here, as that event context is gone,
so we now process events in the new event context until there are no
/* we can't return to the top level here, as that event context is gone,
so we now process events in the new event context until there are no
@@
-141,7
+143,8
@@
static void standard_accept_connection(struct event_context *ev,
called to create a new server task
*/
static void standard_new_task(struct event_context *ev,
called to create a new server task
*/
static void standard_new_task(struct event_context *ev,
- void (*new_task)(struct event_context *, struct server_id , void *),
+ struct loadparm_context *lp_ctx,
+ void (*new_task)(struct event_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
void *private)
{
pid_t pid;
void *private)
{
pid_t pid;
@@
-179,7
+182,7
@@
static void standard_new_task(struct event_context *ev,
setproctitle("task server_id[%d]", pid);
/* setup this new connection */
setproctitle("task server_id[%d]", pid);
/* setup this new connection */
- new_task(ev2, cluster_id(pid), private);
+ new_task(ev2,
lp_ctx,
cluster_id(pid), private);
/* we can't return to the top level here, as that event context is gone,
so we now process events in the new event context until there are no
/* we can't return to the top level here, as that event context is gone,
so we now process events in the new event context until there are no
diff --git
a/source4/smbd/process_thread.c
b/source4/smbd/process_thread.c
index 349ed44bc9cf47944a7e7ec04441cb11169aed47..6c5f4816c02defd2d41bd2eb182f466588ce7860 100644
(file)
--- a/
source4/smbd/process_thread.c
+++ b/
source4/smbd/process_thread.c
@@
-39,7
+39,8
@@
static pthread_key_t title_key;
struct new_conn_state {
struct event_context *ev;
struct socket_context *sock;
struct new_conn_state {
struct event_context *ev;
struct socket_context *sock;
- void (*new_conn)(struct event_context *, struct socket_context *, uint32_t , void *);
+ struct loadparm_context *lp_ctx;
+ void (*new_conn)(struct event_context *, struct loadparm_context *lp_ctx, struct socket_context *, uint32_t , void *);
void *private;
};
void *private;
};
@@
-47,7
+48,7
@@
static void *thread_connection_fn(void *thread_parm)
{
struct new_conn_state *new_conn = talloc_get_type(thread_parm, struct new_conn_state);
{
struct new_conn_state *new_conn = talloc_get_type(thread_parm, struct new_conn_state);
- new_conn->new_conn(new_conn->ev, new_conn->sock, pthread_self(), new_conn->private);
+ new_conn->new_conn(new_conn->ev, new_conn->
lp_ctx, new_conn->
sock, pthread_self(), new_conn->private);
/* run this connection from here */
event_loop_wait(new_conn->ev);
/* run this connection from here */
event_loop_wait(new_conn->ev);
@@
-61,8
+62,11
@@
static void *thread_connection_fn(void *thread_parm)
called when a listening socket becomes readable
*/
static void thread_accept_connection(struct event_context *ev,
called when a listening socket becomes readable
*/
static void thread_accept_connection(struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct socket_context *sock,
struct socket_context *sock,
- void (*new_conn)(struct event_context *, struct socket_context *,
+ void (*new_conn)(struct event_context *,
+ struct loadparm_context *,
+ struct socket_context *,
uint32_t , void *),
void *private)
{
uint32_t , void *),
void *private)
{
@@
-84,6
+88,7
@@
static void thread_accept_connection(struct event_context *ev,
state->new_conn = new_conn;
state->private = private;
state->new_conn = new_conn;
state->private = private;
+ state->lp_ctx = lp_ctx;
state->ev = ev2;
/* accept an incoming connection. */
state->ev = ev2;
/* accept an incoming connection. */
@@
-117,7
+122,9
@@
static void thread_accept_connection(struct event_context *ev,
struct new_task_state {
struct event_context *ev;
struct new_task_state {
struct event_context *ev;
- void (*new_task)(struct event_context *, uint32_t , void *);
+ struct loadparm_context *lp_ctx;
+ void (*new_task)(struct event_context *, struct loadparm_context *,
+ uint32_t , void *);
void *private;
};
void *private;
};
@@
-125,7
+132,8
@@
static void *thread_task_fn(void *thread_parm)
{
struct new_task_state *new_task = talloc_get_type(thread_parm, struct new_task_state);
{
struct new_task_state *new_task = talloc_get_type(thread_parm, struct new_task_state);
- new_task->new_task(new_task->ev, pthread_self(), new_task->private);
+ new_task->new_task(new_task->ev, new_task->lp_ctx, pthread_self(),
+ new_task->private);
/* run this connection from here */
event_loop_wait(new_task->ev);
/* run this connection from here */
event_loop_wait(new_task->ev);
@@
-139,7
+147,10
@@
static void *thread_task_fn(void *thread_parm)
called when a new task is needed
*/
static void thread_new_task(struct event_context *ev,
called when a new task is needed
*/
static void thread_new_task(struct event_context *ev,
- void (*new_task)(struct event_context *, uint32_t , void *),
+ struct loadparm_context *lp_ctx,
+ void (*new_task)(struct event_context *,
+ struct loadparm_context *,
+ uint32_t , void *),
void *private)
{
int rc;
void *private)
{
int rc;
@@
-158,6
+169,7
@@
static void thread_new_task(struct event_context *ev,
}
state->new_task = new_task;
}
state->new_task = new_task;
+ state->lp_ctx = lp_ctx;
state->private = private;
state->ev = ev2;
state->private = private;
state->ev = ev2;
diff --git
a/source4/smbd/service_stream.c
b/source4/smbd/service_stream.c
index 6d2e95dc94e3f8fad8bbc44344b70def1a7bdf9a..0d6f1b72817db810e69627eb5a6cd6457e7f50ba 100644
(file)
--- a/
source4/smbd/service_stream.c
+++ b/
source4/smbd/service_stream.c
@@
-43,6
+43,7
@@
*/
struct stream_socket {
const struct stream_server_ops *ops;
*/
struct stream_socket {
const struct stream_server_ops *ops;
+ struct loadparm_context *lp_ctx;
struct event_context *event_ctx;
const struct model_ops *model_ops;
struct socket_context *sock;
struct event_context *event_ctx;
const struct model_ops *model_ops;
struct socket_context *sock;
@@
-151,6
+152,7
@@
NTSTATUS stream_new_connection_merge(struct event_context *ev,
context of the new process (if appropriate)
*/
static void stream_new_connection(struct event_context *ev,
context of the new process (if appropriate)
*/
static void stream_new_connection(struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct socket_context *sock,
struct server_id server_id, void *private)
{
struct socket_context *sock,
struct server_id server_id, void *private)
{
@@
-182,9
+184,9
@@
static void stream_new_connection(struct event_context *ev,
/* setup to receive internal messages on this connection */
srv_conn->msg_ctx = messaging_init(srv_conn,
/* setup to receive internal messages on this connection */
srv_conn->msg_ctx = messaging_init(srv_conn,
- lp_messaging_path(srv_conn,
global_loadparm
),
+ lp_messaging_path(srv_conn,
lp_ctx
),
srv_conn->server_id,
srv_conn->server_id,
- lp_iconv_convenience(
global_loadparm
),
+ lp_iconv_convenience(
lp_ctx
),
ev);
if (!srv_conn->msg_ctx) {
stream_terminate_connection(srv_conn, "messaging_init() failed");
ev);
if (!srv_conn->msg_ctx) {
stream_terminate_connection(srv_conn, "messaging_init() failed");
@@
-225,7
+227,8
@@
static void stream_accept_handler(struct event_context *ev, struct fd_event *fde
/* ask the process model to create us a process for this new
connection. When done, it calls stream_new_connection()
with the newly created socket */
/* ask the process model to create us a process for this new
connection. When done, it calls stream_new_connection()
with the newly created socket */
- stream_socket->model_ops->accept_connection(ev, stream_socket->sock,
+ stream_socket->model_ops->accept_connection(ev, stream_socket->lp_ctx,
+ stream_socket->sock,
stream_new_connection, stream_socket);
}
stream_new_connection, stream_socket);
}
@@
-238,6
+241,7
@@
static void stream_accept_handler(struct event_context *ev, struct fd_event *fde
to the socket implementation - JRV20070903
*/
NTSTATUS stream_setup_socket(struct event_context *event_context,
to the socket implementation - JRV20070903
*/
NTSTATUS stream_setup_socket(struct event_context *event_context,
+ struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
const struct stream_server_ops *stream_ops,
const char *family,
const struct model_ops *model_ops,
const struct stream_server_ops *stream_ops,
const char *family,
@@
-259,6
+263,8
@@
NTSTATUS stream_setup_socket(struct event_context *event_context,
talloc_steal(stream_socket, stream_socket->sock);
talloc_steal(stream_socket, stream_socket->sock);
+ stream_socket->lp_ctx = talloc_reference(stream_socket, lp_ctx);
+
/* ready to listen */
status = socket_set_option(stream_socket->sock, "SO_KEEPALIVE", NULL);
NT_STATUS_NOT_OK_RETURN(status);
/* ready to listen */
status = socket_set_option(stream_socket->sock, "SO_KEEPALIVE", NULL);
NT_STATUS_NOT_OK_RETURN(status);
diff --git
a/source4/smbd/service_task.c
b/source4/smbd/service_task.c
index f286da5cf6dc7b773433e83285d0f6d41b9a0420..08588464cc8343398fbef4fbf349c411e390131b 100644
(file)
--- a/
source4/smbd/service_task.c
+++ b/
source4/smbd/service_task.c
@@
-53,6
+53,7
@@
struct task_state {
the server specific startup code
*/
static void task_server_callback(struct event_context *event_ctx,
the server specific startup code
*/
static void task_server_callback(struct event_context *event_ctx,
+ struct loadparm_context *lp_ctx,
struct server_id server_id, void *private)
{
struct task_state *state = talloc_get_type(private, struct task_state);
struct server_id server_id, void *private)
{
struct task_state *state = talloc_get_type(private, struct task_state);
@@
-64,7
+65,7
@@
static void task_server_callback(struct event_context *event_ctx,
task->event_ctx = event_ctx;
task->model_ops = state->model_ops;
task->server_id = server_id;
task->event_ctx = event_ctx;
task->model_ops = state->model_ops;
task->server_id = server_id;
- task->lp_ctx =
global_loadparm
;
+ task->lp_ctx =
lp_ctx
;
task->msg_ctx = messaging_init(task,
lp_messaging_path(task, task->lp_ctx),
task->msg_ctx = messaging_init(task,
lp_messaging_path(task, task->lp_ctx),
@@
-83,6
+84,7
@@
static void task_server_callback(struct event_context *event_ctx,
startup a task based server
*/
NTSTATUS task_server_startup(struct event_context *event_ctx,
startup a task based server
*/
NTSTATUS task_server_startup(struct event_context *event_ctx,
+ struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
void (*task_init)(struct task_server *))
{
const struct model_ops *model_ops,
void (*task_init)(struct task_server *))
{
@@
-94,7
+96,7
@@
NTSTATUS task_server_startup(struct event_context *event_ctx,
state->task_init = task_init;
state->model_ops = model_ops;
state->task_init = task_init;
state->model_ops = model_ops;
- model_ops->new_task(event_ctx, task_server_callback, state);
+ model_ops->new_task(event_ctx,
lp_ctx,
task_server_callback, state);
return NT_STATUS_OK;
}
return NT_STATUS_OK;
}
diff --git
a/source4/torture/util_smb.c
b/source4/torture/util_smb.c
index 6621b68b6e91dab46cccbb092361077fc3fc7d11..de7303bac8b3241d1184d2e8e62c283fc2fb618b 100644
(file)
--- a/
source4/torture/util_smb.c
+++ b/
source4/torture/util_smb.c
@@
-294,7
+294,7
@@
bool wire_bad_flags(struct smb_wire_string *str, int flags,
if (flags & STR_TERMINATE) len++;
server_unicode = (transport->negotiate.capabilities&CAP_UNICODE)?true:false;
if (flags & STR_TERMINATE) len++;
server_unicode = (transport->negotiate.capabilities&CAP_UNICODE)?true:false;
- if (getenv("CLI_FORCE_ASCII") || !
lp_unicode(global_loadparm)
) {
+ if (getenv("CLI_FORCE_ASCII") || !
transport->options.unicode
) {
server_unicode = false;
}
server_unicode = false;
}
diff --git
a/source4/web_server/web_server.c
b/source4/web_server/web_server.c
index 87cab2cc92496b7bb60f4845437434725fb2afe9..9ff67f78f30da7458ee44af090b91d2154af3e0a 100644
(file)
--- a/
source4/web_server/web_server.c
+++ b/
source4/web_server/web_server.c
@@
-260,7
+260,8
@@
static void websrv_task_init(struct task_server *task)
num_interfaces = iface_count(ifaces);
for(i = 0; i < num_interfaces; i++) {
const char *address = iface_n_ip(ifaces, i);
num_interfaces = iface_count(ifaces);
for(i = 0; i < num_interfaces; i++) {
const char *address = iface_n_ip(ifaces, i);
- status = stream_setup_socket(task->event_ctx, model_ops,
+ status = stream_setup_socket(task->event_ctx,
+ task->lp_ctx, model_ops,
&web_stream_ops,
"ipv4", address,
&port, lp_socket_options(task->lp_ctx),
&web_stream_ops,
"ipv4", address,
&port, lp_socket_options(task->lp_ctx),
@@
-270,8
+271,8
@@
static void websrv_task_init(struct task_server *task)
talloc_free(ifaces);
} else {
talloc_free(ifaces);
} else {
- status = stream_setup_socket(task->event_ctx,
model_ops,
- &web_stream_ops,
+ status = stream_setup_socket(task->event_ctx,
task->lp_ctx,
+
model_ops,
&web_stream_ops,
"ipv4", lp_socket_address(task->lp_ctx),
&port, lp_socket_options(task->lp_ctx), task);
if (!NT_STATUS_IS_OK(status)) goto failed;
"ipv4", lp_socket_address(task->lp_ctx),
&port, lp_socket_options(task->lp_ctx), task);
if (!NT_STATUS_IS_OK(status)) goto failed;
@@
-297,7
+298,8
@@
static NTSTATUS websrv_init(struct event_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
- return task_server_startup(event_context, model_ops, websrv_task_init);
+ return task_server_startup(event_context, lp_ctx,
+ model_ops, websrv_task_init);
}
/* called at smbd startup - register ourselves as a server service */
}
/* called at smbd startup - register ourselves as a server service */
diff --git
a/source4/winbind/wb_server.c
b/source4/winbind/wb_server.c
index f27a3bd12d83099cc9d5a750865948207161a2f2..eaba6609f30cd5c825f8625bf490b06a5cdc40ef 100644
(file)
--- a/
source4/winbind/wb_server.c
+++ b/
source4/winbind/wb_server.c
@@
-158,7
+158,7
@@
static void winbind_task_init(struct task_server *task)
if (!listen_socket->socket_path) goto nomem;
listen_socket->service = service;
listen_socket->privileged = false;
if (!listen_socket->socket_path) goto nomem;
listen_socket->service = service;
listen_socket->privileged = false;
- status = stream_setup_socket(task->event_ctx, model_ops,
+ status = stream_setup_socket(task->event_ctx,
task->lp_ctx,
model_ops,
&wbsrv_ops, "unix",
listen_socket->socket_path, &port,
lp_socket_options(task->lp_ctx),
&wbsrv_ops, "unix",
listen_socket->socket_path, &port,
lp_socket_options(task->lp_ctx),
@@
-174,7
+174,7
@@
static void winbind_task_init(struct task_server *task)
if (!listen_socket->socket_path) goto nomem;
listen_socket->service = service;
listen_socket->privileged = true;
if (!listen_socket->socket_path) goto nomem;
listen_socket->service = service;
listen_socket->privileged = true;
- status = stream_setup_socket(task->event_ctx, model_ops,
+ status = stream_setup_socket(task->event_ctx,
task->lp_ctx,
model_ops,
&wbsrv_ops, "unix",
listen_socket->socket_path, &port,
lp_socket_options(task->lp_ctx),
&wbsrv_ops, "unix",
listen_socket->socket_path, &port,
lp_socket_options(task->lp_ctx),
@@
-208,7
+208,8
@@
static NTSTATUS winbind_init(struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
- return task_server_startup(event_ctx, model_ops, winbind_task_init);
+ return task_server_startup(event_ctx, lp_ctx,
+ model_ops, winbind_task_init);
}
/*
}
/*
diff --git
a/source4/wrepl_server/wrepl_in_connection.c
b/source4/wrepl_server/wrepl_in_connection.c
index 721a00521338be73d75f48d8dde52096a3b2154b..34d94d73a6b9e5323e489a6cc4d55c344326d280 100644
(file)
--- a/
source4/wrepl_server/wrepl_in_connection.c
+++ b/
source4/wrepl_server/wrepl_in_connection.c
@@
-294,7
+294,9
@@
NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
*/
for(i = 0; i < num_interfaces; i++) {
address = iface_n_ip(ifaces, i);
*/
for(i = 0; i < num_interfaces; i++) {
address = iface_n_ip(ifaces, i);
- status = stream_setup_socket(task->event_ctx, model_ops, &wreplsrv_stream_ops,
+ status = stream_setup_socket(task->event_ctx,
+ task->lp_ctx, model_ops,
+ &wreplsrv_stream_ops,
"ipv4", address, &port,
lp_socket_options(task->lp_ctx),
service);
"ipv4", address, &port,
lp_socket_options(task->lp_ctx),
service);
@@
-306,7
+308,8
@@
NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
}
} else {
address = lp_socket_address(lp_ctx);
}
} else {
address = lp_socket_address(lp_ctx);
- status = stream_setup_socket(task->event_ctx, model_ops, &wreplsrv_stream_ops,
+ status = stream_setup_socket(task->event_ctx, task->lp_ctx,
+ model_ops, &wreplsrv_stream_ops,
"ipv4", address, &port, lp_socket_options(task->lp_ctx),
service);
if (!NT_STATUS_IS_OK(status)) {
"ipv4", address, &port, lp_socket_options(task->lp_ctx),
service);
if (!NT_STATUS_IS_OK(status)) {
diff --git
a/source4/wrepl_server/wrepl_server.c
b/source4/wrepl_server/wrepl_server.c
index 7d4be3e1b5171657b06e49cbb5f967842cd66ff2..50ef7e8550d8c7c2d86345f0393560f6f21499d6 100644
(file)
--- a/
source4/wrepl_server/wrepl_server.c
+++ b/
source4/wrepl_server/wrepl_server.c
@@
-510,7
+510,8
@@
static NTSTATUS wreplsrv_init(struct event_context *event_ctx, struct loadparm_c
return NT_STATUS_OK;
}
return NT_STATUS_OK;
}
- return task_server_startup(event_ctx, model_ops, wreplsrv_task_init);
+ return task_server_startup(event_ctx, lp_ctx,
+ model_ops, wreplsrv_task_init);
}
/*
}
/*