summaryrefslogtreecommitdiff
path: root/source3/lib/conn_tdb.c
Commit message (Collapse)AuthorAgeFilesLines
* smbd: Fix CID 1035365 Buffer not null terminatedVolker Lendecke2013-11-111-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Fix CID 1035366 Buffer not null terminatedVolker Lendecke2013-11-111-4/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Use fstring in conn_tdb.cVolker Lendecke2013-11-111-2/+2
| | | | | | | It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s3-lib: hide incomplete smbXsrv_tcon_global recordsStefan Metzmacher2013-07-091-0/+13
| | | | | | | | | | Part of fix for bug #10003 Pair-programmed-with: Björn Baumbach <bb@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-lib: fix segf while reading incomplete session info (bug #10003)Björn Baumbach2013-07-091-2/+7
| | | | | | | | Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib: remove unused connections_fetch_entry*() and connections_init()Stefan Metzmacher2012-10-191-60/+0
| | | | | | metze Signed-off-by: Michael Adam <obnox@samba.org>
* s3:lib/conn_tdb: implement connections_forall_read() based on ↵Gregor Beck2012-10-191-30/+94
| | | | | | | smbXsrv_*_global_traverse() Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:lib: remove function connections_forall()Gregor Beck2012-10-191-56/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:lib: remove unused function connections_traverse()Gregor Beck2012-10-191-20/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:conn_tdb: add a function connections_fetch_entry_ext() that also takes ↵Gregor Beck2012-06-271-5/+15
| | | | | | | | the cnum and have connections_fetch_entry() call connections_fetch_entry_ext(). Signed-off-by: Michael Adam <obnox@samba.org>
* s3:lib: split things into a conn_tdb.hStefan Metzmacher2012-06-051-0/+1
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jun 5 19:28:35 CEST 2012 on sn-devel-104
* s3: Add a "lock_order" argument to db_openVolker Lendecke2012-01-181-1/+2
| | | | | | | This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
* s3:lib/conn_tdb: avoid using sconn_server_id()Stefan Metzmacher2011-12-161-1/+2
| | | | metze
* s3:conn_tdb: convert connections tdb to only use dbwrap wrapper functionsMichael Adam2011-10-111-13/+45
| | | | Avoid direct use of the db_record and db_context structs.
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2011-07-291-0/+1
| | | | | | Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on allJeremy Allison2010-09-271-1/+1
| | | | | | | | | | TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt this is still safe to use as if opening an existing tdb the new hash will be ignored - it's only used on creating a new tdb not opening an old one. Jeremy.
* s3-build: use dbwrap.h only where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3: Remove procid_self() from connections_fetch_entry()Volker Lendecke2010-08-071-1/+2
|
* s3: Remove an unnecessary NULL checkVolker Lendecke2010-08-071-1/+1
| | | | | Now that connections.tdb is not used for the broadcast messaging anymore, connections_fetch_entry is only called for real connections.
* s3: Add connections_forall_read()Volker Lendecke2010-03-011-0/+42
| | | | | | In a cluster, this makes a large difference: For r/w traverse, we have to do a fetch_locked on every record which for most users of connections_forall is just overkill.
* s3: Make the difference between r/o and r/w in connections_db_ctx more obviousVolker Lendecke2010-03-011-9/+4
|
* s3: Make connections_forall open connections.tdb r/wVolker Lendecke2010-03-011-1/+7
| | | | | | | connections_forall is called from count_current_connections() which potentially deletes dead records. This needs r/w access to connections.tdb. connections_traverse says it does not provide this. Does not really matter in the smbd case, because we have opened it before r/w, so this is "just" cleanup.
* s3: Make connections_fetch_record() staticVolker Lendecke2010-02-241-2/+2
|
* Fix some nonempty blank linesVolker Lendecke2009-08-071-3/+3
|
* Merge CTDB-related fixes from samba-ctdb 3.0 branch ↵Alexander Bokovoy2008-01-161-1/+1
| | | | | | (http://samba.org/~tridge/3_0-ctdb) Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbbb2d081fc23908bafcad04650bfacea)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-2/+2
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r23171: Convert connections.tdb to dbwrapVolker Lendecke2007-10-101-34/+52
| | | | (This used to be commit 80a1f43825063bbbda896175d99700ede5a4757a)
* r22761: This introduces lib/conn_tdb.c with two main functions: ↵Volker Lendecke2007-10-101-0/+109
connections_traverse and connections_forall. This centralizes all the routines that did individual tdb_open("connections.tdb") and direct tdb_traverse. Volker (This used to be commit e43e94cda1ad8876b3cb5d1129080b57fa6ec214)