The branch, master has been updated
       via  ac487bf4d04 lib: Make fd_load work for non-regular files
       via  5c6fdb5dc74 libsmb: Fix cli_smb2_get_reparse_point_fnum_send
       via  0fa5a77f46f pytalloc: Check for errors during module initialization.
       via  b272d161cb3 pytalloc: Handle memory errors when creating pytalloc 
objects.
       via  417a359b33a pytalloc: Further refactoring to eliminate duplicate 
code.
       via  9ac45960fea pytalloc: Refactor the pytalloc_reference and 
pytalloc_steal to use a common method.
       via  1e9b74e8e7a Remove ad2oLschema man page
       via  0c7c44a284a Split oLschema2ldif into library and binary
       via  af3253013a5 Fix tests whithout lmdb
       via  526c6d0be53 s4:dlz make b9_has_soa check dc=@ node
       via  6c62e054669 dlz: Add test to ensure there are writable zones
      from  7841c62ae4c rpc_server3: Add a 
 to a DEBUG message

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ac487bf4d04c9771ada1ca7eeb9dac4e5fe34185
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Feb 21 18:37:08 2019 +0100

    lib: Make fd_load work for non-regular files
    
    Follow-up to
    
    https://lists.samba.org/archive/samba/2018-September/217992.html
    
    and following. This also fixes a small and very theoretical race: Between 
the
    fstat and the read call the file size might change. This would make us fail 
on
    potentially legitimate files.
    
    This is more complex and probably slower, but looking at the use cases I 
don't
    think the speed matters.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13859
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abart...@samba.org>
    Autobuild-Date(master): Tue Mar 26 04:43:40 UTC 2019 on sn-devel-144

commit 5c6fdb5dc741702b626099e53b5d4a01e673241e
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Mar 25 09:11:51 2019 +0100

    libsmb: Fix cli_smb2_get_reparse_point_fnum_send
    
    Use the correct state variable type
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 0fa5a77f46fb8a5ce06b93c0064e3ae4ea64084d
Author: Kristján Valur <krist...@rvx.is>
Date:   Wed Mar 6 14:08:40 2019 +0000

    pytalloc: Check for errors during module initialization.
    
    Signed-off-by: Kristján Valur <krist...@rvx.is>
    Reviewed-by: Noel Power <npo...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit b272d161cb35b8860d3e013ec71081a58d2fcd0c
Author: Kristján Valur <krist...@rvx.is>
Date:   Wed Mar 6 13:54:58 2019 +0000

    pytalloc: Handle memory errors when creating pytalloc objects.
    
    Don't create superfluous exceptions.
    
    Signed-off-by: Kristján Valur <krist...@rvx.is>
    Reviewed-by: Noel Power <npo...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 417a359b33a21d74cb3f45dd1958e39794a65b85
Author: Kristján Valur <krist...@rvx.is>
Date:   Wed Mar 6 13:46:32 2019 +0000

    pytalloc: Further refactoring to eliminate duplicate code.
    
    Signed-off-by: Kristján Valur <krist...@rvx.is>
    Reviewed-by: Noel Power <npo...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 9ac45960fead8723740adad4fab676b56cf95cc8
Author: Kristján Valur <krist...@rvx.is>
Date:   Wed Mar 6 13:29:18 2019 +0000

    pytalloc: Refactor the pytalloc_reference and pytalloc_steal to use a 
common method.
    
    Signed-off-by: Kristján Valur <krist...@rvx.is>
    Reviewed-by: Noel Power <npo...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 1e9b74e8e7ab8a0ffc395e183e77c6235ae8e71d
Author: Michael Hanselmann <pub...@hansmi.ch>
Date:   Sat Mar 23 01:50:06 2019 +0100

    Remove ad2oLschema man page
    
    ad2oLschema itself was removed in commit 17aac8cad2b in March 2009. Also
    remove the last reference to the program.
    
    Signed-off-by: Michael Hanselmann <pub...@hansmi.ch>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 0c7c44a284a26790081c000f5b8f4ed32f9f21d7
Author: Michael Hanselmann <pub...@hansmi.ch>
Date:   Sat Mar 23 02:57:06 2019 +0100

    Split oLschema2ldif into library and binary
    
    The oLschema2ldif program was contained in a single file, making reuse
    of its parsing logic elsewhere impossible. With this change the majority
    of the code is moved to a new file, "lib.c", while the CLI interface is
    now in a "main.c" file.
    
    End-of-line whitespace is also removed.
    
    Signed-off-by: Michael Hanselmann <pub...@hansmi.ch>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit af3253013a5633b6cbd247d6feda0b3f5bc50b74
Author: Mathieu Parent <math.par...@gmail.com>
Date:   Wed Oct 3 20:18:55 2018 +0000

    Fix tests whithout lmdb
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13630
    
    Signed-off-by: Mathieu Parent <math.par...@gmail.com>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 526c6d0be53d97beb38f82a3619d8710fefb4091
Author: Michael Saxl <m...@mwsys.mine.bz>
Date:   Thu Mar 21 18:22:38 2019 +0100

    s4:dlz make b9_has_soa check dc=@ node
    
    the zone node does not hold the dnsRecord values, so for the zone level
    the node dc=@,dc=zonename has to be queried
    
    regression introduced with 28e2a518ff32, BUG: 
https://bugzilla.samba.org/show_bug.cgi?id=13466
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13841
    
    Signed-off-by: Michael Saxl <m...@mwsys.mine.bz>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 6c62e05466917d9454d67eb2dd77e303e612c8a9
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Mar 21 16:12:26 2019 +1300

    dlz: Add test to ensure there are writable zones
    
    This is currently broken since 28e2a518ff32
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13841
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/ldb/tests/python/api.py                        |   2 +-
 lib/talloc/pytalloc.c                              |  16 ++-
 lib/talloc/pytalloc.h                              |   4 +-
 lib/talloc/pytalloc_util.c                         | 152 ++++++++++-----------
 lib/util/util_file.c                               |  63 +++++++--
 source3/libsmb/cli_smb2_fnum.c                     |   2 +-
 source4/dns_server/dlz_bind9.c                     |  11 ++
 source4/setup/fedora-ds-init.ldif                  |   5 +-
 source4/torture/dns/dlz_bind9.c                    |   7 +
 source4/utils/man/ad2oLschema.1.xml                |  87 ------------
 .../utils/{oLschema2ldif.c => oLschema2ldif/lib.c} | 136 +++---------------
 .../utils/oLschema2ldif/lib.h                      |  32 +++--
 source4/utils/oLschema2ldif/main.c                 | 132 ++++++++++++++++++
 .../{man => oLschema2ldif}/oLschema2ldif.1.xml     |   0
 source4/utils/oLschema2ldif/wscript_build          |  12 ++
 source4/utils/wscript_build                        |   8 --
 wscript_build                                      |   2 +-
 17 files changed, 339 insertions(+), 332 deletions(-)
 delete mode 100644 source4/utils/man/ad2oLschema.1.xml
 rename source4/utils/{oLschema2ldif.c => oLschema2ldif/lib.c} (80%)
 copy lib/ldb/ldb_mdb/ldb_mdb_init.c => source4/utils/oLschema2ldif/lib.h (64%)
 create mode 100644 source4/utils/oLschema2ldif/main.c
 rename source4/utils/{man => oLschema2ldif}/oLschema2ldif.1.xml (100%)
 create mode 100644 source4/utils/oLschema2ldif/wscript_build
 delete mode 100644 source4/utils/wscript_build


Changeset truncated at 500 lines:

diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 0c4e269239b..1a7695d315b 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -740,7 +740,7 @@ class SimpleLdbNoLmdb(LdbBaseTest):
             self.fail("Should have failed on missing LMDB")
         except ldb.LdbError as err:
             enum = err.args[0]
-            self.assertEqual(enum, ldb.LDB_ERR_OTHER)
+            self.assertEqual(enum, ldb.ERR_OTHER)
 
 
 class SearchTests(LdbBaseTest):
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 95dbb297a46..ad3ad969a0f 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -281,12 +281,22 @@ static PyObject *module_init(void)
                return NULL;
 
        Py_INCREF(&TallocObject_Type);
-       PyModule_AddObject(m, "Object", (PyObject *)&TallocObject_Type);
+       if (PyModule_AddObject(m, "Object", (PyObject *)&TallocObject_Type)) {
+               goto err;
+       }
        Py_INCREF(&TallocBaseObject_Type);
-       PyModule_AddObject(m, "BaseObject", (PyObject *)&TallocBaseObject_Type);
+       if (PyModule_AddObject(m, "BaseObject", (PyObject 
*)&TallocBaseObject_Type)) {
+               goto err;
+       }
        Py_INCREF(&TallocGenericObject_Type);
-       PyModule_AddObject(m, "GenericObject", (PyObject 
*)&TallocGenericObject_Type);
+       if (PyModule_AddObject(m, "GenericObject", (PyObject 
*)&TallocGenericObject_Type)) {
+               goto err;
+       }
        return m;
+
+err:
+       Py_DECREF(m);
+       return NULL;
 }
 
 #if PY_MAJOR_VERSION >= 3
diff --git a/lib/talloc/pytalloc.h b/lib/talloc/pytalloc.h
index 37416fcb46f..7db6c33cf01 100644
--- a/lib/talloc/pytalloc.h
+++ b/lib/talloc/pytalloc.h
@@ -29,10 +29,10 @@ typedef struct {
        void *ptr; /* eg the array element */
 } pytalloc_Object;
 
-/* Return the PyTypeObject for pytalloc_Object. Returns a new reference. */
+/* Return the PyTypeObject for pytalloc_Object. Returns a borrowed reference. 
*/
 PyTypeObject *pytalloc_GetObjectType(void);
 
-/* Return the PyTypeObject for pytalloc_BaseObject. Returns a new reference. */
+/* Return the PyTypeObject for pytalloc_BaseObject. Returns a borrowed 
reference. */
 PyTypeObject *pytalloc_GetBaseObjectType(void);
 
 /* Check whether a specific object is a talloc Object. */
diff --git a/lib/talloc/pytalloc_util.c b/lib/talloc/pytalloc_util.c
index 265bdcd7e8f..7a426d6c2a6 100644
--- a/lib/talloc/pytalloc_util.c
+++ b/lib/talloc/pytalloc_util.c
@@ -24,6 +24,9 @@
 #include <assert.h>
 #include "pytalloc_private.h"
 
+static PyObject *pytalloc_steal_or_reference(PyTypeObject *py_type,
+                                        TALLOC_CTX *mem_ctx, void *ptr, bool 
steal);
+
 _PUBLIC_ PyTypeObject *pytalloc_GetObjectType(void)
 {
        static PyTypeObject *type = NULL;
@@ -90,56 +93,7 @@ static PyTypeObject *pytalloc_GetGenericObjectType(void)
 _PUBLIC_ PyObject *pytalloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX 
*mem_ctx,
                                     void *ptr)
 {
-       PyTypeObject *BaseObjectType = pytalloc_GetBaseObjectType();
-       PyTypeObject *ObjectType = pytalloc_GetObjectType();
-
-       if (mem_ctx == NULL) {
-               return PyErr_NoMemory();
-       }
-
-       if (PyType_IsSubtype(py_type, BaseObjectType)) {
-               pytalloc_BaseObject *ret
-                       = (pytalloc_BaseObject *)py_type->tp_alloc(py_type, 0);
-
-               ret->talloc_ctx = talloc_new(NULL);
-               if (ret->talloc_ctx == NULL) {
-                       return NULL;
-               }
-
-               /*
-                * This allows us to keep multiple references to this object -
-                * we only reference this context, which is per ptr, not the
-                * talloc_ctx, which is per pytalloc_Object
-                */
-               if (talloc_steal(ret->talloc_ctx, mem_ctx) == NULL) {
-                       return NULL;
-               }
-               ret->talloc_ptr_ctx = mem_ctx;
-               talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
-               ret->ptr = ptr;
-               return (PyObject *)ret;
-
-       } else if (PyType_IsSubtype(py_type, ObjectType)) {
-               pytalloc_Object *ret
-                       = (pytalloc_Object *)py_type->tp_alloc(py_type, 0);
-
-               ret->talloc_ctx = talloc_new(NULL);
-               if (ret->talloc_ctx == NULL) {
-                       return NULL;
-               }
-
-               if (talloc_steal(ret->talloc_ctx, mem_ctx) == NULL) {
-                       return NULL;
-               }
-               talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
-               ret->ptr = ptr;
-               return (PyObject *)ret;
-       } else {
-               PyErr_SetString(PyExc_RuntimeError,
-                               "pytalloc_steal_ex() called for object type "
-                               "not based on talloc");
-               return NULL;
-       }
+       return pytalloc_steal_or_reference(py_type, mem_ctx, ptr, true);
 }
 
 /**
@@ -147,7 +101,7 @@ _PUBLIC_ PyObject *pytalloc_steal_ex(PyTypeObject *py_type, 
TALLOC_CTX *mem_ctx,
  */
 _PUBLIC_ PyObject *pytalloc_steal(PyTypeObject *py_type, void *ptr)
 {
-       return pytalloc_steal_ex(py_type, ptr, ptr);
+       return pytalloc_steal_or_reference(py_type, ptr, ptr, true);
 }
 
 
@@ -165,46 +119,83 @@ _PUBLIC_ PyObject *pytalloc_steal(PyTypeObject *py_type, 
void *ptr)
 _PUBLIC_ PyObject *pytalloc_reference_ex(PyTypeObject *py_type,
                                         TALLOC_CTX *mem_ctx, void *ptr)
 {
-       PyTypeObject *BaseObjectType = pytalloc_GetBaseObjectType();
-       PyTypeObject *ObjectType = pytalloc_GetObjectType();
+       return pytalloc_steal_or_reference(py_type, mem_ctx, ptr, false);
+}
+
+
+/**
+ * Internal function that either steals or referecences the talloc
+ * pointer into a new talloc context.
+ */
+static PyObject *pytalloc_steal_or_reference(PyTypeObject *py_type,
+                                        TALLOC_CTX *mem_ctx, void *ptr, bool 
steal)
+{
+       bool ok = false;
+       TALLOC_CTX *talloc_ctx = NULL;
+       bool is_baseobject = false;
+       PyObject *obj = NULL;
+       PyTypeObject *BaseObjectType = NULL, *ObjectType = NULL;
+
+       BaseObjectType = pytalloc_GetBaseObjectType();
+       if (BaseObjectType == NULL) {
+               goto err;
+       }
+       ObjectType = pytalloc_GetObjectType();
+       if (ObjectType == NULL) {
+               goto err;
+       }
 
+       /* this should have been tested by caller */
        if (mem_ctx == NULL) {
                return PyErr_NoMemory();
        }
 
-       if (PyType_IsSubtype(py_type, BaseObjectType)) {
-               pytalloc_BaseObject *ret
-                       = (pytalloc_BaseObject *)py_type->tp_alloc(py_type, 0);
-               ret->talloc_ctx = talloc_new(NULL);
-               if (ret->talloc_ctx == NULL) {
-                       return NULL;
-               }
-               if (talloc_reference(ret->talloc_ctx, mem_ctx) == NULL) {
+       is_baseobject = PyType_IsSubtype(py_type, BaseObjectType);
+       if (!is_baseobject) {
+               if (!PyType_IsSubtype(py_type, ObjectType)) {
+                       PyErr_SetString(PyExc_TypeError,
+                               "Expected type based on talloc");
                        return NULL;
                }
-               talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
+       }
+
+       obj = py_type->tp_alloc(py_type, 0);
+       if (obj == NULL) {
+               goto err;
+       }
+
+       talloc_ctx = talloc_new(NULL);
+       if (talloc_ctx == NULL) {
+               PyErr_NoMemory();
+               goto err;
+       }
+
+       if (steal) {
+               ok = (talloc_steal(talloc_ctx, mem_ctx) != NULL);
+       } else {
+               ok = (talloc_reference(talloc_ctx, mem_ctx) != NULL);
+       }
+       if (!ok) {
+               goto err;
+       }
+       talloc_set_name_const(talloc_ctx, py_type->tp_name);
+
+       if (is_baseobject) {
+               pytalloc_BaseObject *ret = (pytalloc_BaseObject*)obj;
+               ret->talloc_ctx = talloc_ctx;
                ret->talloc_ptr_ctx = mem_ctx;
                ret->ptr = ptr;
-               return (PyObject *)ret;
-       } else if (PyType_IsSubtype(py_type, ObjectType)) {
-               pytalloc_Object *ret
-                       = (pytalloc_Object *)py_type->tp_alloc(py_type, 0);
-               ret->talloc_ctx = talloc_new(NULL);
-               if (ret->talloc_ctx == NULL) {
-                       return NULL;
-               }
-               if (talloc_reference(ret->talloc_ctx, mem_ctx) == NULL) {
-                       return NULL;
-               }
-               talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
-               ret->ptr = ptr;
-               return (PyObject *)ret;
        } else {
-               PyErr_SetString(PyExc_RuntimeError,
-                               "pytalloc_reference_ex() called for object type 
"
-                               "not based on talloc");
-               return NULL;
+               pytalloc_Object *ret = (pytalloc_Object*)obj;
+               ret->talloc_ctx = talloc_ctx;
+               ret->ptr = ptr;
        }
+       return obj;
+
+err:
+       TALLOC_FREE(talloc_ctx);
+       Py_XDECREF(obj);
+       return NULL;
 }
 
 /*
@@ -332,7 +323,6 @@ _PUBLIC_ int pytalloc_BaseObject_PyType_Ready(PyTypeObject 
*type)
 {
        PyTypeObject *talloc_type = pytalloc_GetBaseObjectType();
        if (talloc_type == NULL) {
-               PyErr_Format(PyExc_TypeError, "pytalloc: unable to get 
talloc.BaseObject type");
                return -1;
        }
 
diff --git a/lib/util/util_file.c b/lib/util/util_file.c
index 90d39f7cdd3..7a8644e3f5d 100644
--- a/lib/util/util_file.c
+++ b/lib/util/util_file.c
@@ -170,30 +170,63 @@ load a file into memory from a fd.
 **/
 _PUBLIC_ char *fd_load(int fd, size_t *psize, size_t maxsize, TALLOC_CTX 
*mem_ctx)
 {
-       struct stat sbuf;
-       char *p;
-       size_t size;
+       FILE *file;
+       char *p = NULL;
+       size_t size = 0;
+       size_t chunk = 1024;
+       int err;
+
+       if (maxsize == 0) {
+               maxsize = SIZE_MAX;
+       }
 
-       if (fstat(fd, &sbuf) != 0) return NULL;
+       file = fdopen(fd, "r");
+       if (file == NULL) {
+               return NULL;
+       }
 
-       size = sbuf.st_size;
+       while (size < maxsize) {
+               size_t newbufsize;
+               size_t nread;
 
-       if (maxsize) {
-               size = MIN(size, maxsize);
-       }
+               chunk = MIN(chunk, (maxsize - size));
 
-       p = (char *)talloc_size(mem_ctx, size+1);
-       if (!p) return NULL;
+               newbufsize = size + (chunk+1); /* chunk+1 can't overflow */
+               if (newbufsize < size) {
+                       goto fail; /* overflow */
+               }
 
-       if (read(fd, p, size) != size) {
-               talloc_free(p);
-               return NULL;
+               p = talloc_realloc(mem_ctx, p, char, newbufsize);
+               if (p == NULL) {
+                       goto fail;
+               }
+
+               nread = fread(p+size, 1, chunk, file);
+               size += nread;
+
+               if (nread != chunk) {
+                       break;
+               }
        }
-       p[size] = 0;
 
-       if (psize) *psize = size;
+       err = ferror(file);
+       if (err != 0) {
+               goto fail;
+       }
 
+       p[size] = '\0';
+
+       if (psize != NULL) {
+               *psize = size;
+       }
+
+       fclose(file);
        return p;
+
+fail:
+       TALLOC_FREE(p);
+       fclose(file);
+       return NULL;
 }
 
 /**
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 38e46329fb0..44786ca5912 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -5131,7 +5131,7 @@ struct tevent_req *cli_smb2_get_reparse_point_fnum_send(
                                uint16_t fnum)
 {
        struct tevent_req *req, *subreq;
-       struct cli_smb2_set_reparse_point_fnum_state *state = NULL;
+       struct cli_smb2_get_reparse_point_fnum_state *state = NULL;
        NTSTATUS status;
 
        req = tevent_req_create(mem_ctx, &state,
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 070990db3cf..0e7fcfc2c25 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -1280,6 +1280,17 @@ static bool b9_has_soa(struct dlz_bind9_data *state, 
struct ldb_dn *dn, const ch
                return false;
        }
 
+       /*
+        * The SOA record is alwas stored under DC=@,DC=zonename
+        * This can probably be removed when dns_common_lookup makes a fallback
+        * lookup on @ pseudo record
+        */
+
+       if (!ldb_dn_add_child_fmt(dn,"DC=@")) {
+               talloc_free(tmp_ctx);
+               return false;
+       }
+
        werr = dns_common_lookup(state->samdb, tmp_ctx, dn,
                                 &records, &num_records, NULL);
        if (!W_ERROR_IS_OK(werr)) {
diff --git a/source4/setup/fedora-ds-init.ldif 
b/source4/setup/fedora-ds-init.ldif
index 83cdb6b392e..1de8a01fba6 100644
--- a/source4/setup/fedora-ds-init.ldif
+++ b/source4/setup/fedora-ds-init.ldif
@@ -14,10 +14,7 @@ objectclass: extensibleObject
 objectclass: nsBackendInstance
 nsslapd-suffix: dc=tammy,dc=abartlet,dc=net
 
-# Generate 99_ad.ldif with 
-
-# bin/ad2oLschema -I setup/fedora-ds-init.ldif 
--option=convert:target=fedora-ds -O 
/opt/fedora-ds/slapd-piglett/config/schema/99_ad.ldif -H 
/data/samba/samba4/prefix/private/sam.ldb
-# Then install 00_staish_core.ldif 30ns-common.ldif and 99_ad.ldif
+# Generate 99_ad.ldif, then install 00_staish_core.ldif 30ns-common.ldif and 
99_ad.ldif
 # into /opt/fedora-ds/slapd-piglett/config/schema/
 #
 
diff --git a/source4/torture/dns/dlz_bind9.c b/source4/torture/dns/dlz_bind9.c
index a627e2351f7..e5aec26e20a 100644
--- a/source4/torture/dns/dlz_bind9.c
+++ b/source4/torture/dns/dlz_bind9.c
@@ -85,6 +85,8 @@ static bool test_dlz_bind9_create(struct torture_context 
*tctx)
        return true;
 }
 
+static bool calls_zone_hook = false;
+
 static isc_result_t dlz_bind9_writeable_zone_hook(dns_view_t *view,
                                           const char *zone_name)
 {
@@ -119,6 +121,8 @@ static isc_result_t 
dlz_bind9_writeable_zone_hook(dns_view_t *view,
        }
        talloc_free(msg);
 
+       calls_zone_hook = true;
+
        return ISC_R_SUCCESS;
 }
 
@@ -138,12 +142,15 @@ static bool test_dlz_bind9_configure(struct 
torture_context *tctx)
                                 ISC_R_SUCCESS,
                                 "Failed to create samba_dlz");
 
+       calls_zone_hook = false;
        torture_assert_int_equal(tctx, dlz_configure((void*)tctx, dbdata),
                                                     ISC_R_SUCCESS,
                                 "Failed to configure samba_dlz");
 
        dlz_destroy(dbdata);
 
+       torture_assert_int_equal(tctx, calls_zone_hook, 1, "Hasn't called zone 
hook");
+
        return true;
 }
 
diff --git a/source4/utils/man/ad2oLschema.1.xml 
b/source4/utils/man/ad2oLschema.1.xml
deleted file mode 100644
index 30648b5edb9..00000000000
--- a/source4/utils/man/ad2oLschema.1.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
-<refentry id="ad2oLschema.1">
-
-<refmeta>
-       <refentrytitle>ad2oLschema</refentrytitle>
-       <manvolnum>1</manvolnum>
-</refmeta>
-
-
-<refnamediv>
-       <refname>ad2oLschema</refname>
-       <refpurpose>Converts AC-like LDAP schemas to OpenLDAP
-       compatible schema files</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
-       <cmdsynopsis>
-               <command>ad2oLschema</command>
-               <arg choice="opt">-I INPUT-FILE</arg>
-               <arg choice="opt">-O OUTPUT-FILE</arg>
-       </cmdsynopsis>
-</refsynopsisdiv>
-
-<refsect1>
-       <title>DESCRIPTION</title>
-
-       <para>ad2oLschema is a simple tool that converts AD-like LDIF
-       schema files into OpenLDAP schema files.</para>
-</refsect1>
-
-
-<refsect1>
-       <title>OPTIONS</title>
-
-       <variablelist>
-               <varlistentry>
-               <term>-H url</term>
-               <listitem><para>URL to an LDB or LDAP server with an AD schema 
to read.                 </para></listitem>
-               </varlistentry>
-
-               <varlistentry>
-               <term>-I input-file</term> <listitem><para>AD schema
-               to read. If neither this nor -H is specified, the
-               schema file will be read from standard input.
-               </para></listitem>
-               </varlistentry>
-
-       <varlistentry>
-               <term>-O output-file</term>
-               <listitem><para>File to write OpenLDAP version of schema to.
-               </para></listitem>
-       </varlistentry>
-       </variablelist>
-</refsect1>
-
-<refsect1>
-       <title>VERSION</title>
-
-       <para>This man page is correct for version 4.0 of the Samba 
suite.</para>


-- 
Samba Shared Repository

Reply via email to