summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-12 23:01:08 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-13 14:06:07 +0200
commit01c934c81e55b79601122d8e0740c7946077c37e (patch)
treef6e7909690bc399c3036ef80e22997aadbf88884 /source4/ntvfs/posix
parent3cdb1fe4404e26ae383cfb73bfa8af36cb1d7f7c (diff)
downloadsamba-01c934c81e55b79601122d8e0740c7946077c37e.tar.gz
samba-01c934c81e55b79601122d8e0740c7946077c37e.tar.bz2
samba-01c934c81e55b79601122d8e0740c7946077c37e.zip
lib/util: Add back control of mmap and hash size in tdb for top level build
This passes down a struct loadparm_context to allow these parameters to be checked. This may be s3 or s4 context, allowing the #if _SAMBA_BUILD_ macro to go away safely. Andrew Bartlett
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/python/pyxattr_tdb.c6
-rw-r--r--source4/ntvfs/posix/vfs_posix.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/python/pyxattr_tdb.c b/source4/ntvfs/posix/python/pyxattr_tdb.c
index 768dcbcafd..7e59b54ee2 100644
--- a/source4/ntvfs/posix/python/pyxattr_tdb.c
+++ b/source4/ntvfs/posix/python/pyxattr_tdb.c
@@ -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);
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 00ed146c96..cecaee00cc 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -120,7 +120,8 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
eadb = share_string_option(scfg, PVFS_EADB, NULL);
if (eadb != NULL) {
pvfs->ea_db = tdb_wrap_open(pvfs, eadb, 50000,
- TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+ TDB_DEFAULT, O_RDWR|O_CREAT, 0600,
+ pvfs->ntvfs->ctx->lp_ctx);
if (pvfs->ea_db != NULL) {
pvfs->flags |= PVFS_FLAG_XATTR_ENABLE;
} else {