#include "ntvfs/ipc/proto.h"
#include "rpc_server/dcerpc_server.h"
#include "libcli/raw/ioctl.h"
+#include "param/param.h"
/* this is the private structure used to keep the state of an open
ipc$ connection. It needs to keep information about all open
private->pipe_list = NULL;
/* setup the DCERPC server subsystem */
- status = dcesrv_init_ipc_context(private, &private->dcesrv);
+ status = dcesrv_init_ipc_context(private, global_loadparm, &private->dcesrv);
NT_STATUS_NOT_OK_RETURN(status);
return NT_STATUS_OK;
{
enum srvsvc_PlatformId id;
- id = lp_parm_int(global_loadparm, NULL, "server_info", "platform_id", PLATFORM_ID_NT);
+ id = lp_parm_int(dce_ctx->lp_ctx, NULL, "server_info", "platform_id", PLATFORM_ID_NT);
return id;
}
/* if there's no string return our NETBIOS name */
if (!p) {
- return talloc_strdup(mem_ctx, lp_netbios_name(global_loadparm));
+ return talloc_strdup(mem_ctx, lp_netbios_name(dce_ctx->lp_ctx));
}
/* if there're '\\\\' in front remove them otherwise just pass the string */
const char *dcesrv_common_get_domain_name(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
{
- return talloc_strdup(mem_ctx, lp_workgroup(global_loadparm));
+ return talloc_strdup(mem_ctx, lp_workgroup(dce_ctx->lp_ctx));
}
/* This hardcoded value should go into a ldb database! */
_PUBLIC_ uint32_t dcesrv_common_get_version_major(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
{
- return lp_parm_int(global_loadparm, NULL, "server_info", "version_major", 5);
+ return lp_parm_int(dce_ctx->lp_ctx, NULL, "server_info", "version_major", 5);
}
/* This hardcoded value should go into a ldb database! */
_PUBLIC_ uint32_t dcesrv_common_get_version_minor(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
{
- return lp_parm_int(global_loadparm, NULL, "server_info", "version_minor", 2);
+ return lp_parm_int(dce_ctx->lp_ctx, NULL, "server_info", "version_minor", 2);
}
/* This hardcoded value should go into a ldb database! */
_PUBLIC_ uint32_t dcesrv_common_get_version_build(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
{
- return lp_parm_int(global_loadparm, NULL, "server_info", "version_build", 3790);
+ return lp_parm_int(dce_ctx->lp_ctx, NULL, "server_info", "version_build", 3790);
}
/* This hardcoded value should go into a ldb database! */
default_server_announce |= SV_TYPE_SERVER;
default_server_announce |= SV_TYPE_SERVER_UNIX;
- switch (lp_announce_as(global_loadparm)) {
+ switch (lp_announce_as(dce_ctx->lp_ctx)) {
case ANNOUNCE_AS_NT_SERVER:
default_server_announce |= SV_TYPE_SERVER_NT;
/* fall through... */
break;
}
- switch (lp_server_role(global_loadparm)) {
+ switch (lp_server_role(dce_ctx->lp_ctx)) {
case ROLE_DOMAIN_MEMBER:
default_server_announce |= SV_TYPE_DOMAIN_MEMBER;
break;
break;
}
/* open main ldb */
- samctx = samdb_connect(tmp_ctx, global_loadparm, anonymous_session(tmp_ctx, global_loadparm));
+ samctx = samdb_connect(tmp_ctx, global_loadparm, anonymous_session(tmp_ctx, dce_ctx->lp_ctx));
if (samctx == NULL) {
DEBUG(2,("Unable to open samdb in determining server announce flags\n"));
} else {
default:
break;
}
- if (lp_time_server(global_loadparm))
+ if (lp_time_server(dce_ctx->lp_ctx))
default_server_announce |= SV_TYPE_TIME_SOURCE;
- if (lp_host_msdfs(global_loadparm))
+ if (lp_host_msdfs(dce_ctx->lp_ctx))
default_server_announce |= SV_TYPE_DFS_SERVER;
}
-static void dcesrv_init_hdr(struct ncacn_packet *pkt)
+static void dcesrv_init_hdr(struct ncacn_packet *pkt, bool bigendian)
{
pkt->rpc_vers = 5;
pkt->rpc_vers_minor = 0;
- if (lp_rpc_big_endian(global_loadparm)) {
+ if (bigendian) {
pkt->drep[0] = 0;
} else {
pkt->drep[0] = DCERPC_DREP_LE;
NTSTATUS status;
/* setup a bind_ack */
- dcesrv_init_hdr(&pkt);
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_FAULT;
NTSTATUS status;
/* setup a bind_nak */
- dcesrv_init_hdr(&pkt);
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_BIND_NAK;
}
/* setup a bind_ack */
- dcesrv_init_hdr(&pkt);
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_BIND_ACK;
}
/* setup a alter_resp */
- dcesrv_init_hdr(&pkt);
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_ALTER_RESP;
pointers */
push->ptr_count = call->ndr_pull->ptr_count;
- if (lp_rpc_big_endian(global_loadparm)) {
+ if (lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx)) {
push->flags |= LIBNDR_FLAG_BIGENDIAN;
}
}
/* form the dcerpc response packet */
- dcesrv_init_hdr(&pkt);
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_RESPONSE;
return status;
}
-_PUBLIC_ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx, const char **endpoint_servers, struct dcesrv_context **_dce_ctx)
+_PUBLIC_ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
+ const char **endpoint_servers, struct dcesrv_context **_dce_ctx)
{
NTSTATUS status;
struct dcesrv_context *dce_ctx;
dce_ctx = talloc(mem_ctx, struct dcesrv_context);
NT_STATUS_HAVE_NO_MEMORY(dce_ctx);
dce_ctx->endpoint_list = NULL;
+ dce_ctx->lp_ctx = lp_ctx;
for (i=0;endpoint_servers[i];i++) {
const struct dcesrv_endpoint_server *ep_server;
/*
initialise the dcerpc server context for ncacn_np based services
*/
-_PUBLIC_ NTSTATUS dcesrv_init_ipc_context(TALLOC_CTX *mem_ctx, struct dcesrv_context **_dce_ctx)
+_PUBLIC_ NTSTATUS dcesrv_init_ipc_context(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+ struct dcesrv_context **_dce_ctx)
{
NTSTATUS status;
struct dcesrv_context *dce_ctx;
- status = dcesrv_init_context(mem_ctx, lp_dcerpc_endpoint_servers(global_loadparm), &dce_ctx);
+ status = dcesrv_init_context(mem_ctx, lp_ctx, lp_dcerpc_endpoint_servers(lp_ctx), &dce_ctx);
NT_STATUS_NOT_OK_RETURN(status);
*_dce_ctx = dce_ctx;
struct dcesrv_interface iface;
} *interface_list;
} *endpoint_list;
+
+ /* loadparm context to use for this connection */
+ struct loadparm_context *lp_ctx;
};
/* this structure is used by modules to determine the size of some critical types */
return false;
}
- status = gensec_server_start(dce_conn, call->event_ctx, global_loadparm, call->msg_ctx, &auth->gensec_security);
+ status = gensec_server_start(dce_conn, call->event_ctx, call->conn->dce_ctx->lp_ctx, call->msg_ctx, &auth->gensec_security);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("Failed to start GENSEC for DCERPC server: %s\n", nt_errstr(status)));
return false;
return false;
}
- cli_credentials_set_conf(server_credentials, global_loadparm);
+ cli_credentials_set_conf(server_credentials, call->conn->dce_ctx->lp_ctx);
status = cli_credentials_set_machine_account(server_credentials);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("Failed to obtain server credentials, perhaps a standalone server?: %s\n", nt_errstr(status)));
/*
* connect to the samdb
*/
- b_state->sam_ctx = samdb_connect(b_state, global_loadparm, dce_call->conn->auth_state.session_info);
+ b_state->sam_ctx = samdb_connect(b_state, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (!b_state->sam_ctx) {
return WERR_FOOBAR;
}
ZERO_STRUCT(domain_guid);
- switch (lp_server_role(global_loadparm)) {
+ switch (lp_server_role(dce_call->conn->dce_ctx->lp_ctx)) {
case ROLE_STANDALONE:
role = DS_ROLE_STANDALONE_SERVER;
break;
break;
}
- switch (lp_server_role(global_loadparm)) {
+ switch (lp_server_role(dce_call->conn->dce_ctx->lp_ctx)) {
case ROLE_STANDALONE:
- domain = talloc_strdup(mem_ctx, lp_workgroup(global_loadparm));
+ domain = talloc_strdup(mem_ctx, lp_workgroup(dce_call->conn->dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(domain);
break;
case ROLE_DOMAIN_MEMBER:
- domain = talloc_strdup(mem_ctx, lp_workgroup(global_loadparm));
+ domain = talloc_strdup(mem_ctx, lp_workgroup(dce_call->conn->dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(domain);
/* TODO: what is with dns_domain and forest and guid? */
break;
return NT_STATUS_INVALID_PARAMETER;
}
- secret_state->sam_ldb = talloc_reference(secret_state, secrets_db_connect(mem_ctx,
- global_loadparm));
+ secret_state->sam_ldb = talloc_reference(secret_state,
+ secrets_db_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
/* search for the secret record */
ret = gendb_search(secret_state->sam_ldb, mem_ctx,
ldb_dn_new(mem_ctx, secret_state->sam_ldb, "cn=LSA Secrets"),
} else {
secret_state->sam_ldb = talloc_reference(secret_state,
- secrets_db_connect(mem_ctx, global_loadparm));
+ secrets_db_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
secret_state->global = false;
name = r->in.name.string;
}
/* make sure the sam database is accessible */
- state->sam_ldb = samdb_connect(state, global_loadparm, dce_call->conn->auth_state.session_info);
+ state->sam_ldb = samdb_connect(state, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (state->sam_ldb == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
partitions_basedn = samdb_partitions_dn(state->sam_ldb, mem_ctx);
- state->sidmap = sidmap_open(state, global_loadparm);
+ state->sidmap = sidmap_open(state, dce_call->conn->dce_ctx->lp_ctx);
if (state->sidmap == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
return NT_STATUS_ACCESS_DENIED;
}
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, global_loadparm));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
creds->account_name = talloc_steal(creds, r->in.account_name);
creds->computer_name = talloc_steal(creds, r->in.computer_name);
- creds->domain = talloc_strdup(creds, lp_workgroup(global_loadparm));
+ creds->domain = talloc_strdup(creds, lp_workgroup(dce_call->conn->dce_ctx->lp_ctx));
creds->secure_channel_type = r->in.secure_channel_type;
/* remember this session key state */
- nt_status = schannel_store_session_key(mem_ctx, global_loadparm, creds);
+ nt_status = schannel_store_session_key(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, creds);
return nt_status;
}
&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
/* TODO: we need to deny anonymous access here */
nt_status = auth_context_create(mem_ctx,
dce_call->event_ctx, dce_call->msg_ctx,
- global_loadparm,
+ dce_call->conn->dce_ctx->lp_ctx,
&auth_context);
NT_STATUS_NOT_OK_RETURN(nt_status);
/* TODO: we need to deny anonymous access here */
nt_status = auth_context_create(mem_ctx,
dce_call->event_ctx, dce_call->msg_ctx,
- global_loadparm,
+ dce_call->conn->dce_ctx->lp_ctx,
&auth_context);
NT_STATUS_NOT_OK_RETURN(nt_status);
sam6 = talloc_zero(mem_ctx, struct netr_SamInfo6);
NT_STATUS_HAVE_NO_MEMORY(sam6);
sam6->base = *sam;
- sam6->forest.string = lp_realm(global_loadparm);
+ sam6->forest.string = lp_realm(dce_call->conn->dce_ctx->lp_ctx);
sam6->principle.string = talloc_asprintf(mem_ctx, "%s@%s",
sam->account_name.string, sam6->forest.string);
NT_STATUS_HAVE_NO_MEMORY(sam6->principle.string);
{
NTSTATUS nt_status;
struct creds_CredentialState *creds;
- nt_status = schannel_fetch_session_key(mem_ctx, global_loadparm, r->in.computer_name, lp_workgroup(global_loadparm), &creds);
+ nt_status = schannel_fetch_session_key(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, r->in.computer_name, lp_workgroup(dce_call->conn->dce_ctx->lp_ctx), &creds);
if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}
NULL);
NT_STATUS_NOT_OK_RETURN(status);
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, dce_call->conn->auth_state.session_info);
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
ZERO_STRUCT(r->out);
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, dce_call->conn->auth_state.session_info);
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (sam_ctx == NULL) {
return WERR_DS_SERVICE_UNAVAILABLE;
}
* - check all r->in.* parameters (server_unc is ignored by w2k3!)
*/
r->out.info->dc_unc = talloc_asprintf(mem_ctx, "\\\\%s.%s",
- lp_netbios_name(global_loadparm),
- lp_realm(global_loadparm));
+ lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx),
+ lp_realm(dce_call->conn->dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(r->out.info->dc_unc);
r->out.info->dc_address = talloc_strdup(mem_ctx, "\\\\0.0.0.0");
W_ERROR_HAVE_NO_MEMORY(r->out.info->dc_address);
ZERO_STRUCT(r->out);
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, dce_call->conn->auth_state.session_info);
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (sam_ctx == NULL) {
return WERR_GENERAL_FAILURE;
}
NTSTATUS status;
const struct ndr_interface_table *table;
struct dcesrv_remote_private *private;
- const char *binding = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "binding");
+ const char *binding = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "binding");
const char *user, *pass, *domain;
struct cli_credentials *credentials;
bool machine_account;
- machine_account = lp_parm_bool(global_loadparm, NULL, "dcerpc_remote", "use_machine_account", false);
+ machine_account = lp_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "use_machine_account", false);
private = talloc(dce_call->conn, struct dcesrv_remote_private);
if (!private) {
return NT_STATUS_INVALID_PARAMETER;
}
- user = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "user");
- pass = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "password");
- domain = lp_parm_string(global_loadparm, NULL, "dceprc_remote", "domain");
+ user = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "user");
+ pass = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "password");
+ domain = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dceprc_remote", "domain");
table = ndr_table_by_uuid(&iface->syntax_id.uuid); /* FIXME: What about if_version ? */
if (!table) {
if (!credentials) {
return NT_STATUS_NO_MEMORY;
}
- cli_credentials_set_conf(credentials, global_loadparm);
+ cli_credentials_set_conf(credentials, dce_call->conn->dce_ctx->lp_ctx);
cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
if (domain) {
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
} else if (machine_account) {
DEBUG(5, ("dcerpc_remote: RPC Proxy: Using machine account\n"));
credentials = cli_credentials_init(private);
- cli_credentials_set_conf(credentials, global_loadparm);
+ cli_credentials_set_conf(credentials, dce_call->conn->dce_ctx->lp_ctx);
if (domain) {
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
}
static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
{
int i;
- const char **ifaces = str_list_make(dce_ctx, lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "interfaces"),NULL);
+ const char **ifaces = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_remote", "interfaces"),NULL);
if (!ifaces) {
DEBUG(3,("remote_op_init_server: no interfaces configured\n"));
}
/* make sure the sam database is accessible */
- c_state->sam_ctx = samdb_connect(c_state, global_loadparm, dce_call->conn->auth_state.session_info);
+ c_state->sam_ctx = samdb_connect(c_state, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (c_state->sam_ctx == NULL) {
talloc_free(c_state);
return NT_STATUS_INVALID_SYSTEM_SERVICE;
ZERO_STRUCT(r->out.info);
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, dce_call->conn->auth_state.session_info);
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info);
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
}
/* To change a password we need to open as system */
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
}
/* To change a password we need to open as system */
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
}
/* To change a password we need to open as system */
- sam_ctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
task_server_set_title(task, "task[dcesrv]");
status = dcesrv_init_context(task->event_ctx,
+ task->lp_ctx,
lp_dcerpc_endpoint_servers(task->lp_ctx),
&dce_ctx);
if (!NT_STATUS_IS_OK(status)) goto failed;
return register_server_service("rpc", dcesrv_init);
}
-
-
server_name += 2;
/* NETBIOS NAME is ok */
- ret = strequal(lp_netbios_name(global_loadparm), server_name);
+ ret = strequal(lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx), server_name);
if (ret) return WERR_OK;
- aliases = lp_netbios_aliases(global_loadparm);
+ aliases = lp_netbios_aliases(dce_call->conn->dce_ctx->lp_ctx);
for (i=0; aliases && aliases[i]; i++) {
if (strequal(aliases[i], server_name)) {
/* DNS NAME is ok
* TODO: we need to check if aliases are also ok
*/
- if (lp_realm(global_loadparm)) {
+ if (lp_realm(dce_call->conn->dce_ctx->lp_ctx)) {
char *str;
str = talloc_asprintf(mem_ctx, "%s.%s",
- lp_netbios_name(global_loadparm),
- lp_realm(global_loadparm));
+ lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx),
+ lp_realm(dce_call->conn->dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(str);
ret = strequal(str, server_name);
NTSTATUS status;
struct ntptr_context *ntptr;
- status = ntptr_init_context(dce_call->context, lp_ntptr_providor(global_loadparm), &ntptr);
+ status = ntptr_init_context(dce_call->context, lp_ntptr_providor(dce_call->conn->dce_ctx->lp_ctx), &ntptr);
NT_STATUS_NOT_OK_RETURN(status);
dce_call->context->private = ntptr;
}
ZERO_STRUCT(rop);
- rop.in.server_name = lp_netbios_name(global_loadparm);
+ rop.in.server_name = lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
W_ERROR_HAVE_NO_MEMORY(rop.in.server_name);
rop.in.printer_local = 0;
rop.in.type = REG_NONE;
info101->version_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx);
info101->version_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx);
info101->server_type = dcesrv_common_get_server_type(mem_ctx, dce_ctx);
- info101->comment = talloc_strdup(mem_ctx, lp_serverstring(global_loadparm));
+ info101->comment = talloc_strdup(mem_ctx, lp_serverstring(dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(info101->comment);
r->out.info.info101 = info101;
info102->version_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx);
info102->version_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx);
info102->server_type = dcesrv_common_get_server_type(mem_ctx, dce_ctx);
- info102->comment = talloc_strdup(mem_ctx, lp_serverstring(global_loadparm));
+ info102->comment = talloc_strdup(mem_ctx, lp_serverstring(dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(info102->comment);
info102->users = dcesrv_common_get_users(mem_ctx, dce_ctx);
struct sidmap_context *sidmap;
uid_t uid;
- sidmap = sidmap_open(mem_ctx, global_loadparm);
+ sidmap = sidmap_open(mem_ctx, dce_call->conn->dce_ctx->lp_ctx);
if (sidmap == NULL) {
DEBUG(10, ("sidmap_open failed\n"));
return NT_STATUS_NO_MEMORY;
struct sidmap_context *sidmap;
uid_t uid;
- sidmap = sidmap_open(mem_ctx, global_loadparm);
+ sidmap = sidmap_open(mem_ctx, dce_call->conn->dce_ctx->lp_ctx);
if (sidmap == NULL) {
DEBUG(10, ("sidmap_open failed\n"));
return NT_STATUS_NO_MEMORY;
struct sidmap_context *sidmap;
gid_t gid;
- sidmap = sidmap_open(mem_ctx, global_loadparm);
+ sidmap = sidmap_open(mem_ctx, dce_call->conn->dce_ctx->lp_ctx);
if (sidmap == NULL) {
DEBUG(10, ("sidmap_open failed\n"));
return NT_STATUS_NO_MEMORY;
struct sidmap_context *sidmap;
gid_t gid;
- sidmap = sidmap_open(mem_ctx, global_loadparm);
+ sidmap = sidmap_open(mem_ctx, dce_call->conn->dce_ctx->lp_ctx);
if (sidmap == NULL) {
DEBUG(10, ("sidmap_open failed\n"));
return NT_STATUS_NO_MEMORY;
WERROR err;
err = reg_open_samba(dce_call->context,
- &ctx, global_loadparm, dce_call->conn->auth_state.session_info,
+ &ctx, dce_call->conn->dce_ctx->lp_ctx, dce_call->conn->auth_state.session_info,
NULL);
if (!W_ERROR_IS_OK(err)) {
status = smbsrv_add_socket(p->conn->event_ctx, tctx->lp_ctx, &single_ops, address);
torture_assert_ntstatus_ok(tctx, status, "starting smb server");
- status = dcesrv_init_context(tctx, endpoints, &dce_ctx);
+ status = dcesrv_init_context(tctx, tctx->lp_ctx, endpoints, &dce_ctx);
torture_assert_ntstatus_ok(tctx, status,
"unable to initialize DCE/RPC server");