diff options
author | Volker Lendecke <vl@samba.org> | 2015-09-21 12:28:20 +0200 |
---|---|---|
committer | Ralph Böhme <slow@samba.org> | 2015-09-22 04:51:16 +0200 |
commit | 5d12eb890880c4d7e23a266f6817e40636fc81e6 (patch) | |
tree | 2adb48ebc6f1e814119c34ede30df4daf7630077 /source4/ntvfs | |
parent | 1399198d51d1f79ff99304369442e04c015eef23 (diff) | |
download | samba-5d12eb890880c4d7e23a266f6817e40636fc81e6.tar.gz |
dbwrap: Remove loadparm_context from db_open_tdb
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/python/pyxattr_tdb.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/ntvfs/posix/python/pyxattr_tdb.c b/source4/ntvfs/posix/python/pyxattr_tdb.c index d3390a3d906..84ef426ead8 100644 --- a/source4/ntvfs/posix/python/pyxattr_tdb.c +++ b/source4/ntvfs/posix/python/pyxattr_tdb.c @@ -46,6 +46,7 @@ static PyObject *py_wrap_setxattr(PyObject *self, PyObject *args) int blobsize; int ret; TALLOC_CTX *mem_ctx; + struct loadparm_context *lp_ctx; struct db_context *eadb = NULL; struct file_id id; struct stat sbuf; @@ -56,8 +57,11 @@ static PyObject *py_wrap_setxattr(PyObject *self, PyObject *args) blob.length = blobsize; mem_ctx = talloc_new(NULL); - eadb = db_open_tdb(mem_ctx, py_default_loadparm_context(mem_ctx), tdbname, 50000, - TDB_DEFAULT, O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_2, + + lp_ctx = py_default_loadparm_context(mem_ctx); + eadb = db_open_tdb(mem_ctx, tdbname, 50000, + lpcfg_tdb_flags(lp_ctx, TDB_DEFAULT), + O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_2, DBWRAP_FLAG_NONE); if (eadb == NULL) { @@ -91,6 +95,7 @@ static PyObject *py_wrap_getxattr(PyObject *self, PyObject *args) { char *filename, *attribute, *tdbname; TALLOC_CTX *mem_ctx; + struct loadparm_context *lp_ctx; DATA_BLOB blob; PyObject *ret_obj; int ret; @@ -104,8 +109,10 @@ static PyObject *py_wrap_getxattr(PyObject *self, PyObject *args) mem_ctx = talloc_new(NULL); - eadb = db_open_tdb(mem_ctx, py_default_loadparm_context(mem_ctx), tdbname, 50000, - TDB_DEFAULT, O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_2, + lp_ctx = py_default_loadparm_context(mem_ctx); + eadb = db_open_tdb(mem_ctx, tdbname, 50000, + lpcfg_tdb_flags(lp_ctx, TDB_DEFAULT), + O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_2, DBWRAP_FLAG_NONE); if (eadb == NULL) { |