summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
Diffstat (limited to 'pidl')
-rw-r--r--pidl/TODO3
-rw-r--r--pidl/config.mk4
-rw-r--r--pidl/lib/Parse/Pidl/ODL.pm4
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm2
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm10
-rwxr-xr-xpidl/pidl14
-rwxr-xr-x[-rw-r--r--]pidl/tests/samba3-srv.pl0
7 files changed, 18 insertions, 19 deletions
diff --git a/pidl/TODO b/pidl/TODO
index 8886441a75..87ae0c5fd3 100644
--- a/pidl/TODO
+++ b/pidl/TODO
@@ -1,8 +1,5 @@
- warn when union instances don't have a discriminant
-- EJS output backend shouldn't use the NDR levels stuff but instead
- as the "C levels" and NDR levels don't necessarily match.
-
- true multiple dimension array / strings in arrays support
- compatibility mode for generating MIDL-readable data:
diff --git a/pidl/config.mk b/pidl/config.mk
index 07c8647ecd..45582f5d56 100644
--- a/pidl/config.mk
+++ b/pidl/config.mk
@@ -1,13 +1,13 @@
PIDL = $(PERL) $(pidldir)/pidl
$(pidldir)/Makefile: $(pidldir)/Makefile.PL
- cd $(pidldir) && $(PERL) Makefile.PL PREFIX=$(prefix)
+ @cd $(pidldir) && $(PERL) Makefile.PL PREFIX=$(prefix)
pidl-testcov: $(pidldir)/Makefile
cd $(pidldir) && cover -test
installpidl:: $(pidldir)/Makefile
- $(MAKE) -C $(pidldir) install_vendor VENDORPREFIX=$(prefix) \
+ @$(MAKE) -C $(pidldir) install_vendor VENDORPREFIX=$(prefix) \
INSTALLVENDORLIB=$(datarootdir)/perl5 \
INSTALLVENDORBIN=$(bindir) \
INSTALLVENDORSCRIPT=$(bindir) \
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});
diff --git a/pidl/pidl b/pidl/pidl
index e58442ba1b..577db0a53f 100755
--- a/pidl/pidl
+++ b/pidl/pidl
@@ -17,7 +17,7 @@ pidl - An IDL compiler written in Perl
pidl --help
-pidl [--outputdir[=OUTNAME]] [--includedir DIR...] [--parse-idl-tree] [--dump-idl-tree] [--dump-ndr-tree] [--header[=OUTPUT]] [--ejs[=OUTPUT]] [--python[=OUTPUT]] [--swig[=OUTPUT]] [--ndr-parser[=OUTPUT]] [--client] [--server] [--warn-compat] [--quiet] [--verbose] [--template] [--ws-parser[=OUTPUT]] [--diff] [--dump-idl] [--tdr-parser[=OUTPUT]] [--samba3-ndr-client[=OUTPUT]] [--samba3-ndr-server[=OUTPUT]] [--typelib=[OUTPUT]] [<idlfile>.idl]...
+pidl [--outputdir[=OUTNAME]] [--includedir DIR...] [--parse-idl-tree] [--dump-idl-tree] [--dump-ndr-tree] [--header[=OUTPUT]] [--python[=OUTPUT]] [--swig[=OUTPUT]] [--ndr-parser[=OUTPUT]] [--client] [--server] [--warn-compat] [--quiet] [--verbose] [--template] [--ws-parser[=OUTPUT]] [--diff] [--dump-idl] [--tdr-parser[=OUTPUT]] [--samba3-ndr-client[=OUTPUT]] [--samba3-ndr-server[=OUTPUT]] [--typelib=[OUTPUT]] [<idlfile>.idl]...
=head1 DESCRIPTION
@@ -478,7 +478,6 @@ my($opt_ndr_parser);
my($opt_tdr_parser);
my($opt_ws_parser);
my($opt_swig);
-my($opt_ejs);
my($opt_python);
my($opt_quiet) = 0;
my($opt_outputdir) = '.';
@@ -521,7 +520,6 @@ Samba 4 output:
--ndr-parser[=OUTFILE] create a C NDR parser [ndr_BASENAME.c]
--client[=OUTFILE] create a C NDR client [ndr_BASENAME_c.c]
--tdr-parser[=OUTFILE] create a C TDR parser [tdr_BASENAME.c]
- --ejs[=OUTFILE] create ejs wrapper file [BASENAME_ejs.c]
--python[=OUTFILE] create python wrapper file [py_BASENAME.c]
--swig[=OUTFILE] create swig wrapper file [BASENAME.i]
--server[=OUTFILE] create server boilerplate [ndr_BASENAME_s.c]
@@ -567,7 +565,6 @@ my $result = GetOptions (
'ndr-parser:s' => \$opt_ndr_parser,
'client:s' => \$opt_client,
'ws-parser:s' => \$opt_ws_parser,
- 'ejs' => \$opt_ejs,
'python' => \$opt_python,
'diff' => \$opt_diff,
'swig:s' => \$opt_swig,
@@ -664,7 +661,6 @@ sub process_file($)
defined($opt_server) or
defined($opt_header) or
defined($opt_ndr_parser) or
- defined($opt_ejs) or
defined($opt_python) or
defined($opt_dump_ndr_tree) or
defined($opt_samba3_header) or
@@ -709,14 +705,6 @@ sub process_file($)
FileSave($filename, $code);
}
- if (defined($opt_ejs)) {
- require Parse::Pidl::Samba4::EJS;
- my $generator = new Parse::Pidl::Samba4::EJS();
- my ($hdr,$prsr) = $generator->Parse($ndr, $h_filename);
- FileSave("$outputdir/ndr_$basename\_ejs.c", $prsr);
- FileSave("$outputdir/ndr_$basename\_ejs.h", $hdr);
- }
-
if (defined($opt_python)) {
require Parse::Pidl::Samba4::Python;
my $generator = new Parse::Pidl::Samba4::Python();
diff --git a/pidl/tests/samba3-srv.pl b/pidl/tests/samba3-srv.pl
index d1e2bc9545..d1e2bc9545 100644..100755
--- a/pidl/tests/samba3-srv.pl
+++ b/pidl/tests/samba3-srv.pl