summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap_tdb.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-20s3-dbwrap: Add dbwrap_set_stored_callbackVolker Lendecke1-0/+1
This is a per-db function that is called whenever some record is modified
2012-04-20s3-dbwrap: Add "db_context" to "db_record"Volker Lendecke1-0/+2
2012-04-20s3-dbwrap: Add dbwrap_db_idVolker Lendecke1-0/+25
This returns a blob uniquely identifying the database
2012-04-19s3: Fix Coverity ID 2744: CHECKED_RETURNVolker Lendecke1-1/+6
2012-04-18s3-dbwrap: push lp_ctx up another layer in the stackAndrew Bartlett1-4/+1
This will allow db_open_tdb() to be called from common code, which may already have a loadparm context loaded. It also slowly moves the lp_ctx up the stack, as required to remove the library loop between smbconf and the registry. Andrew Bartlett
2012-04-17s3: Add dbwrap_try_fetch_lockedVolker Lendecke1-9/+32
This is designed to spread the load on individual ctdb records to allow upper layers to do backoff mechanisms. In the ctdb case, do not get the record if a local lock is already taken. If we are not dmaster, do at most one migrate attempt. For the tdb case, this is a nonblocking fetch_locked. If someone else has the lock, give up.
2012-03-16s3-dbwrap: Move "lock_order" initialization to db_open_xxVolker Lendecke1-1/+3
2012-03-10tdb_wrap: Move to specific directory.Jelmer Vernooij1-1/+1
It's a bit confusing to mix low-level and high-level libraries. We had multiple libraries in one directory, and there were have circular dependencies with other libraries outside that directory (in this case, samba-hostconfig). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
2011-12-16s3:dbwrap fix return value of db_tdb_parseChristian Ambach1-1/+5
use the TDB ecode to determine the NTSTATUS return value and not the return code that is just -1
2011-12-15s3-dbwrap: Remove the "fetch" db_context callbackVolker Lendecke1-65/+0
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Make dbwrap_parse_record return NTSTATUSVolker Lendecke1-5/+31
Also, the parser now returns void. The parser is called if and only if dbwrap_parse_record returns NT_STATUS_OK. Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-13s3-dbwrap: Simplify db_tdb_fetchlock_parse a bitVolker Lendecke1-10/+11
Introduce a local variable for the result, replace "state->result" by "result"
2011-12-08s3-dbwrap: Use simpler code for logging keysVolker Lendecke1-18/+23
2011-12-08s3: Fix some blank line endingsVolker Lendecke1-5/+5
2011-11-30s3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in ↵Michael Adam1-1/+1
db_tdb_fetch() Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Nov 30 01:46:31 CET 2011 on sn-devel-104
2011-11-29s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.Michael Adam1-10/+25
This implement more correct NTSTATUS handling inside the backends. This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
2011-10-13lib/util: Add back control of mmap and hash size in tdb for top level buildAndrew Bartlett1-2/+6
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
2011-10-11s3:dbwrap: move definitions of db_record and db_contect structs to ↵Michael Adam1-0/+1
dbwrap_private.h The API and callers now only need the forward declarations.
2011-10-11s3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_tdbGregor Beck1-0/+8
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: add specific dbwrap_exists() implementation to dbwrap_tdbGregor Beck1-0/+8
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: move the db_open_tdb() prototype to a new header dbwrap_tdb.hMichael Adam1-0/+1
2011-09-14dbwrap_tdb: handle tdb2 return values properly.Rusty Russell1-4/+4
TDB2 versions of tdb_parse_record etc return an error code, not -1. Turn those into -1/0 in dbwrap_tdb to insulate the rest of the code from that change. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-08-25s3:dbwrap_tdb: correctly catch the error from the return code of tdb_parse ↵Michael Adam1-1/+6
in db_tdb_fetch()
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-0/+379
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104