summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--WHATSNEW4.txt9
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm19
2 files changed, 25 insertions, 3 deletions
diff --git a/WHATSNEW4.txt b/WHATSNEW4.txt
index 2093a4ee1f..7c637ccd66 100644
--- a/WHATSNEW4.txt
+++ b/WHATSNEW4.txt
@@ -69,8 +69,11 @@ In the time since Samba4 alpha6 was released in Janurary 2009, Samba has
continued to evolve, but you may particularly notice these areas
(in no particular order):
- OpenLDAP Multi Master Replication can now also replicate the OpenLDAP
- configuration itself.
+ Multi Master Replication (MMR) configuration can now be generated
+ for the OpenLDAP-Backend.
+
+ OpenLDAP-Online-Configuration (olc) can now be generated for the
+ OpenLDAP-Backend. (OpenLDAP-Versions >=2.4.15 required).
Support for Windows 7 beta as a member of the Samba4 domain
@@ -83,6 +86,8 @@ continued to evolve, but you may particularly notice these areas
the corrected IDL back into Samba4
Fixes to allow use of C++ compilers and to increase portability
+
+ Fixed TLS (SSL) support with modern versions of GnuTLS
These are just some of the highlights of the work done in the past
month. More details can be found in our GIT history.
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 48785f5b0a..6099fe5cae 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -275,7 +275,24 @@ sub PythonStruct($$$$$$)
$self->pidl("if (!PyArg_ParseTuple(args, \"s#:__ndr_unpack__\", &blob.data, &blob.length))");
$self->pidl("\treturn NULL;");
$self->pidl("");
- $self->pidl("err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
+
+ # This disgusting hack works around the fact that ndr_pull_struct_blob_all will always fail on structures with relative pointers.
+ # So, map ndr_unpack to ndr_pull_struct_blob_all only if we don't have any relative pointers in this
+ my $got_relative = 0;
+ if ($#{$d->{ELEMENTS}} > -1) {
+ foreach my $e (@{$d->{ELEMENTS}}) {
+ my $l = $e->{LEVELS}[0];
+ if ($l->{TYPE} eq "POINTER" and ($l->{POINTER_TYPE} eq "relative")) {
+ $got_relative = 1;
+ last;
+ }
+ }
+ }
+ if ($got_relative == 0) {
+ $self->pidl("err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
+ } else {
+ $self->pidl("err = ndr_pull_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
+ }
$self->pidl("if (err != NDR_ERR_SUCCESS) {");
$self->indent;
$self->pidl("PyErr_SetNdrError(err);");