lib/util: Add back control of mmap and hash size in tdb for top level build
[garming/samba-autobuild/.git] / source4 / ntvfs / posix / python / pyxattr_tdb.c
index 768dcbcafddf8c9993532200ccf88e082e07ea3f..7e59b54ee2e85fda46181b3b17c719e7f76088a0 100644 (file)
@@ -26,6 +26,7 @@
 #include "lib/util/wrap_xattr.h"
 #include "ntvfs/posix/vfs_posix.h"
 #include "libcli/util/pyerrors.h"
+#include "param/pyparam.h"
 
 void initxattr_tdb(void);
 
@@ -50,7 +51,8 @@ static PyObject *py_wrap_setxattr(PyObject *self, PyObject *args)
        blob.length = blobsize;
        mem_ctx = talloc_new(NULL);
        eadb = tdb_wrap_open(mem_ctx, tdbname, 50000,
-                               TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+                            TDB_DEFAULT, O_RDWR|O_CREAT, 0600,
+                            py_default_loadparm_context(mem_ctx));
 
        if (eadb == NULL) {
                PyErr_SetFromErrno(PyExc_IOError);
@@ -82,7 +84,7 @@ static PyObject *py_wrap_getxattr(PyObject *self, PyObject *args)
 
        mem_ctx = talloc_new(NULL);
        eadb = tdb_wrap_open(mem_ctx, tdbname, 50000,
-                               TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+                            TDB_DEFAULT, O_RDWR|O_CREAT, 0600, py_default_loadparm_context(mem_ctx));
        if (eadb == NULL) {
                PyErr_SetFromErrno(PyExc_IOError);
                talloc_free(mem_ctx);