summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm9
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm17
2 files changed, 14 insertions, 12 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
index e30102b4e1..bb0c18e13c 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(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;
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(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;
}
@@ -167,7 +169,8 @@ pidl "
}
if (dce_call->fault_code != 0) {
- dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN,
+ 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;
}
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 58e6910d3d..a3107d4672 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 NULL;");
+ $self->deindent;
+ $self->pidl("}");
+
$self->pidl("credentials = cli_credentials_from_py_object(py_credentials);");
$self->pidl("if (credentials == NULL) {");
$self->indent;
@@ -1173,7 +1181,6 @@ sub Parse($$$$$)
$self->pidl("{");
$self->indent;
$self->pidl("PyObject *m;");
- $self->pidl("NTSTATUS status;");
$self->pidl("");
foreach (@{$self->{ready_types}}) {
@@ -1210,14 +1217,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});