mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
Remove use of global_loadparm during initialization of gensec.
This commit is contained in:
@ -698,6 +698,14 @@ sub Interface($$$)
|
|||||||
$self->pidl("}");
|
$self->pidl("}");
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
|
|
||||||
|
$self->pidl("status = dcerpc_init(lp_ctx);");
|
||||||
|
$self->pidl("if (!NT_STATUS_IS_OK(status)) {");
|
||||||
|
$self->indent;
|
||||||
|
$self->pidl("PyErr_SetNTSTATUS(status);");
|
||||||
|
$self->pidl("return;");
|
||||||
|
$self->deindent;
|
||||||
|
$self->pidl("}");
|
||||||
|
|
||||||
$self->pidl("credentials = cli_credentials_from_py_object(py_credentials);");
|
$self->pidl("credentials = cli_credentials_from_py_object(py_credentials);");
|
||||||
$self->pidl("if (credentials == NULL) {");
|
$self->pidl("if (credentials == NULL) {");
|
||||||
$self->indent;
|
$self->indent;
|
||||||
@ -1210,14 +1218,6 @@ sub Parse($$$$$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
$self->pidl("status = dcerpc_init();");
|
|
||||||
$self->pidl("if (!NT_STATUS_IS_OK(status)) {");
|
|
||||||
$self->indent;
|
|
||||||
$self->pidl("PyErr_SetNTSTATUS(status);");
|
|
||||||
$self->pidl("return;");
|
|
||||||
$self->deindent;
|
|
||||||
$self->pidl("}");
|
|
||||||
|
|
||||||
$self->deindent;
|
$self->deindent;
|
||||||
$self->pidl("}");
|
$self->pidl("}");
|
||||||
return ($self->{res_hdr}, $self->{res});
|
return ($self->{res_hdr}, $self->{res});
|
||||||
|
@ -486,7 +486,7 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx,
|
|||||||
struct dcerpc_pipe *p;
|
struct dcerpc_pipe *p;
|
||||||
struct rpc_registry_context *rctx;
|
struct rpc_registry_context *rctx;
|
||||||
|
|
||||||
dcerpc_init();
|
dcerpc_init(lp_ctx);
|
||||||
|
|
||||||
rctx = talloc(NULL, struct rpc_registry_context);
|
rctx = talloc(NULL, struct rpc_registry_context);
|
||||||
|
|
||||||
|
@ -37,9 +37,10 @@ struct IWbemContext;
|
|||||||
DEBUG(1, ("OK : %s\n", msg)); \
|
DEBUG(1, ("OK : %s\n", msg)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
void wmi_init(struct com_context **ctx, struct cli_credentials *credentials)
|
void wmi_init(struct com_context **ctx, struct cli_credentials *credentials,
|
||||||
|
struct loadparm_context *lp_ctx)
|
||||||
{
|
{
|
||||||
dcerpc_init();
|
dcerpc_init(lp_ctx);
|
||||||
ndr_table_init();
|
ndr_table_init();
|
||||||
|
|
||||||
/* FIXME: Register DCOM proxies? */
|
/* FIXME: Register DCOM proxies? */
|
||||||
|
@ -1157,8 +1157,8 @@ static const struct {
|
|||||||
{NT_STATUS(0x80000025), W_ERROR(0x962)},
|
{NT_STATUS(0x80000025), W_ERROR(0x962)},
|
||||||
{NT_STATUS(0x80000288), W_ERROR(0x48d)},
|
{NT_STATUS(0x80000288), W_ERROR(0x48d)},
|
||||||
{NT_STATUS(0x80000289), W_ERROR(0x48e)},
|
{NT_STATUS(0x80000289), W_ERROR(0x48e)},
|
||||||
{NT_STATUS_OK, WERR_OK}};
|
{NT_STATUS_OK, WERR_OK}
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
|
check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
#include "auth/gensec/gensec.h"
|
#include "auth/gensec/gensec.h"
|
||||||
#include "param/param.h"
|
#include "param/param.h"
|
||||||
|
|
||||||
_PUBLIC_ NTSTATUS dcerpc_init(void)
|
_PUBLIC_ NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx)
|
||||||
{
|
{
|
||||||
return gensec_init(global_loadparm);
|
return gensec_init(lp_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS status);
|
static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS status);
|
||||||
|
@ -309,7 +309,7 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
|
|||||||
struct loadparm_context *lp_ctx,
|
struct loadparm_context *lp_ctx,
|
||||||
uint8_t auth_level);
|
uint8_t auth_level);
|
||||||
struct event_context *dcerpc_event_context(struct dcerpc_pipe *p);
|
struct event_context *dcerpc_event_context(struct dcerpc_pipe *p);
|
||||||
NTSTATUS dcerpc_init(void);
|
NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx);
|
||||||
struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c);
|
struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c);
|
||||||
uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c);
|
uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c);
|
||||||
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
|
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
|
||||||
|
@ -77,6 +77,8 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(struct torture_context *tctx,
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct dcerpc_binding *binding;
|
struct dcerpc_binding *binding;
|
||||||
|
|
||||||
|
dcerpc_init(tctx->lp_ctx);
|
||||||
|
|
||||||
status = torture_rpc_binding(tctx, &binding);
|
status = torture_rpc_binding(tctx, &binding);
|
||||||
if (NT_STATUS_IS_ERR(status))
|
if (NT_STATUS_IS_ERR(status))
|
||||||
return status;
|
return status;
|
||||||
@ -371,8 +373,6 @@ NTSTATUS torture_rpc_init(void)
|
|||||||
{
|
{
|
||||||
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "RPC");
|
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "RPC");
|
||||||
|
|
||||||
dcerpc_init();
|
|
||||||
|
|
||||||
ndr_table_init();
|
ndr_table_init();
|
||||||
|
|
||||||
torture_suite_add_simple_test(suite, "LSA", torture_rpc_lsa);
|
torture_suite_add_simple_test(suite, "LSA", torture_rpc_lsa);
|
||||||
|
@ -183,7 +183,7 @@ static int binary_net(int argc, const char **argv)
|
|||||||
return net_usage(ctx, argc, argv);
|
return net_usage(ctx, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
dcerpc_init();
|
dcerpc_init(cmdline_lp_ctx);
|
||||||
|
|
||||||
ev = s4_event_context_init(NULL);
|
ev = s4_event_context_init(NULL);
|
||||||
if (!ev) {
|
if (!ev) {
|
||||||
|
Reference in New Issue
Block a user