diff options
Diffstat (limited to 'pidl/lib/Parse/Pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/ODL.pm | 4 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 2 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 10 |
3 files changed, 15 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/ODL.pm b/pidl/lib/Parse/Pidl/ODL.pm index ad8c76f622..c49cdfb795 100644 --- a/pidl/lib/Parse/Pidl/ODL.pm +++ b/pidl/lib/Parse/Pidl/ODL.pm @@ -57,6 +57,10 @@ sub ODL2IDL if ($x->{TYPE} eq "IMPORT") { foreach my $idl_file (@{$x->{PATHS}}) { $idl_file = unmake_str($idl_file); + unless (-f "$basedir/$idl_file") { + error($x, "Unable to open include file `$idl_file'"); + next; + } my $podl = Parse::Pidl::IDL::parse_file("$basedir/$idl_file", $opt_incdirs); if (defined(@$podl)) { require Parse::Pidl::Typelist; diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index b21d3f4bbc..c565d8a572 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -110,7 +110,7 @@ sub ParseFunction($$) pidl "\treturn false;"; pidl "}"; pidl ""; - pidl "pull = ndr_pull_init_blob(&blob, r);"; + pidl "pull = ndr_pull_init_blob(&blob, r, NULL);"; pidl "if (pull == NULL) {"; pidl "\ttalloc_free(r);"; pidl "\treturn false;"; diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 74cec5a827..fc64c35fca 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1173,6 +1173,7 @@ sub Parse($$$$$) $self->pidl("{"); $self->indent; $self->pidl("PyObject *m;"); + $self->pidl("NTSTATUS status;"); $self->pidl(""); foreach (@{$self->{ready_types}}) { @@ -1208,6 +1209,15 @@ sub Parse($$$$$) $self->pidl("PyModule_AddObject(m, \"$object_name\", $c_name);"); } + $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}); |