From dccf1b2c9f1b17f6ad12da11626110fcd86cd07e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 2 Nov 2008 00:26:04 +0100 Subject: Remove another use of global_loadparm. --- pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm index e30102b4e1..484886bbfa 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm @@ -120,7 +120,8 @@ static NTSTATUS $name\__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_C /* unravel the NDR for the packet */ ndr_err = ndr_table_$name.calls[opnum].ndr_pull(pull, NDR_IN, *r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN, + dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx), + &ndr_table_$name, opnum, NDR_IN, &dce_call->pkt.u.request.stub_and_verifier); dce_call->fault_code = DCERPC_FAULT_NDR; return NT_STATUS_NET_WRITE_FAULT; @@ -144,7 +145,8 @@ pidl " } if (dce_call->fault_code != 0) { - dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN, + dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx), + &ndr_table_$name, opnum, NDR_IN, &dce_call->pkt.u.request.stub_and_verifier); return NT_STATUS_NET_WRITE_FAULT; } @@ -167,7 +169,8 @@ pidl " } if (dce_call->fault_code != 0) { - dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN, + dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx), + &ndr_table_$name, opnum, NDR_IN, &dce_call->pkt.u.request.stub_and_verifier); return NT_STATUS_NET_WRITE_FAULT; } -- cgit From c537f7a91449728bbffdda628877f72db2d4e96b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 2 Nov 2008 05:49:36 +0100 Subject: Fix the build. --- pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm index 484886bbfa..bb0c18e13c 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm @@ -120,7 +120,7 @@ static NTSTATUS $name\__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_C /* unravel the NDR for the packet */ ndr_err = ndr_table_$name.calls[opnum].ndr_pull(pull, NDR_IN, *r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx), + dcerpc_log_packet(dce_call->conn->packet_log_dir, &ndr_table_$name, opnum, NDR_IN, &dce_call->pkt.u.request.stub_and_verifier); dce_call->fault_code = DCERPC_FAULT_NDR; @@ -145,7 +145,7 @@ pidl " } if (dce_call->fault_code != 0) { - dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx), + dcerpc_log_packet(dce_call->conn->packet_log_dir, &ndr_table_$name, opnum, NDR_IN, &dce_call->pkt.u.request.stub_and_verifier); return NT_STATUS_NET_WRITE_FAULT; @@ -169,7 +169,7 @@ pidl " } if (dce_call->fault_code != 0) { - dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx), + dcerpc_log_packet(dce_call->conn->packet_log_dir, &ndr_table_$name, opnum, NDR_IN, &dce_call->pkt.u.request.stub_and_verifier); return NT_STATUS_NET_WRITE_FAULT; -- cgit From a1cc27814240bf50bd546dcfc8b80d3838a6a38d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 2 Nov 2008 17:04:22 +0100 Subject: Remove use of global_loadparm during initialization of gensec. --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 58e6910d3d..38aee2c9d1 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -698,6 +698,14 @@ sub Interface($$$) $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("if (credentials == NULL) {"); $self->indent; @@ -1210,14 +1218,6 @@ sub Parse($$$$$) } $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->pidl("}"); return ($self->{res_hdr}, $self->{res}); -- cgit From 2f438b4cdeaacf55b0832bf71b2ef15b30cdd758 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 11 Nov 2008 17:10:24 +0100 Subject: Remove unused variable, fix return. --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 38aee2c9d1..a3107d4672 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -702,7 +702,7 @@ sub Interface($$$) $self->pidl("if (!NT_STATUS_IS_OK(status)) {"); $self->indent; $self->pidl("PyErr_SetNTSTATUS(status);"); - $self->pidl("return;"); + $self->pidl("return NULL;"); $self->deindent; $self->pidl("}"); @@ -1181,7 +1181,6 @@ sub Parse($$$$$) $self->pidl("{"); $self->indent; $self->pidl("PyObject *m;"); - $self->pidl("NTSTATUS status;"); $self->pidl(""); foreach (@{$self->{ready_types}}) { -- cgit