summaryrefslogtreecommitdiff
path: root/source3/groupdb/mapping_tdb.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-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.
2011-11-28s3: Fix a crash in group_mapping.ldb->tdb conversionVolker Lendecke1-0/+13
When we find a group_mapping.ldb entry without a comment, the upgrade code would have crashed with a NULL dereference Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Nov 28 12:24:08 CET 2011 on sn-devel-104
2011-10-12s3-group-mapping: Remove fstrings from GROUP_MAP.Simo Sorce1-38/+115
Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12s3-groupdb: split out groupdb/mapping_tdb.h.Günther Deschner1-0/+1
Guenther
2011-10-11s3:groupdb: convert mapping_tdb.c to use dbwrap wrapper functions onlyMichael Adam1-21/+31
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-4/+5
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-1/+1
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam1-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.
2011-06-20tdb_traverse/tdb_traverse_read: check returns for negative, not -1.Rusty Russell1-1/+1
TDB2 returns a negative error number on failure. This is compatible if we always check for < 0 instead of == -1. Also, there's no tdb_traverse_read in TDB2: we don't try to make traverse reliable any more, so there are no write locks anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett1-7/+7
strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-06A couple more off-by-one calculations with strlcpy.Jeremy Allison1-2/+2
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 6 18:39:17 CEST 2011 on sn-devel-104
2011-05-06s3: only include tdb headers where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-passdb: add passdb.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-1/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-09-20s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.Günther Deschner1-4/+5
Guenther
2010-09-11s3-auth Change type of num_sids to uint32_tAndrew Bartlett1-3/+10
size_t is overkill here, and in struct security_token in the num_sids is uint32_t. This includes a change to the prototype of add_sid_to_array() and add_sid_to_array_unique(), which has had a number of consequnetial changes as I try to sort out all the callers using a pointer to the number of sids. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-26s3-build: use dbwrap.h only where needed.Günther Deschner1-0/+1
Guenther
2010-05-21s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett1-24/+24
This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-14s3: Fix a typoVolker Lendecke1-1/+1
2010-03-02s3: Fix some C++ warningsVolker Lendecke1-1/+1
2010-03-02s3: Fix an uninitialized variable warningVolker Lendecke1-1/+1
2010-03-01s3:groupmap revert to tdb storageSimo Sorce1-12/+267
Group mapping needs to be cluster aware, and this means using the tdb backend. Remove ldb group mapping as this is not cluster aware.
2009-06-08Pass a talloc_ctx to pdb_enum_aliasmemVolker Lendecke1-2/+5
2008-09-29s3:mapping_tdb: fix the del_aliasmem() functionStefan Metzmacher1-3/+2
We should not cancel the transaction, when we want to delete a key. metze
2008-08-13fixed lots of places that paniced on a failed transaction_commit,Andrew Tridgell1-2/+2
thinking it was a failure of a transaction cancel (This used to be commit 22dbe158ed62ae47bbcb41bba3db345294f75437)
2008-08-13first cut at adding full transactions for ctdb to samba3Andrew Tridgell1-1/+1
(This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
2008-07-03Fix build warning.Günther Deschner1-1/+1
Thanks to Thorkil Olesen. Guenther (This used to be commit 3130aa63fd64c08c1d8be8338d6490aeb12c234a)
2008-04-12groupdb: make mapping_tdb compatible to mapping_ldbStefan Metzmacher1-1/+1
mapping_ldb replaces the record if it already exists. I'm not sure if that a good thing, but for now both backends should provide the same behavior. metze (This used to be commit b313acdd31c97d032c3890764addf66c6b9a4d89)
2008-04-04mapping_tdb: fix enumeration of mappings.Michael Adam1-1/+1
db->traverse_read returns the number of traversed object on success. Michael (This used to be commit 2be2188a97060f04c2dea3ca9ed0fd3db0b3df7c)
2008-04-04mapping.tdb: fix creation of entries with GROUP_PREFIXMichael Adam1-1/+1
Macro is no expanded inside literal string. Michael (This used to be commit 872a3d3d38287ab9cbb260d05777481d94e03539)
2008-04-01Convert dbwrap_trans_delete to NTSTATUSVolker Lendecke1-3/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit dead193f46c2b19955ab3e5ac5ba343694f4858a)
2008-04-01Convert dbwrap_trans_store to NTSTATUSVolker Lendecke1-3/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit 5f4de856af1abe63b13059bbe1615cb5877770d0)
2008-04-01mapping_tdb: use the correct sid for the key creationStefan Metzmacher1-1/+1
metze (This used to be commit 0d221a3f0a948e173b22585b7833a5441d860a57)
2008-04-01mapping_tdb: use db_open_trans()Stefan Metzmacher1-2/+2
metze (This used to be commit 16d18df0d069aec645c41e38e8c926ccdaac9388)
2008-04-01Protect group_mapping.tdb ops with transactionsVolker Lendecke1-16/+66
Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit d702ed73c1b986ded9deaa3abed92c39d71949fc)
2008-03-28Fix a segfaultVolker Lendecke1-1/+1
(This used to be commit 40d1d64c6a2ae128eb3fce0e7f5351b0c5942f30)
2008-03-26util_tdb: remove trivial and unused tdb_wipe().Michael Adam1-1/+1
It has been replaced by tdb_wipe_all(). Michael (This used to be commit cdde2e4eaca51d51f036ad99d55df7bfd6535b03)
2008-03-25util_tdb: add a wrapper tdb_wipe() for traverse with tdb_traverse_delete_fn().Michael Adam1-1/+1
Replace all callers of traverse with this tdb_traverse_delete_fn() and don't export tdb_traverse_delete_fn() anymore. Michael (This used to be commit d4be4e30cd8c3bdc303da30e42280f892a45a8c9)
2008-03-11Convert mapping_tdb.c to dbwrapVolker Lendecke1-292/+279
I know, this is not used anymore, but until ldb knows about ctdb which is blocked by the lack of transactions in ctdb, a tiny patch reactivating mapping_tdb.c might be needed for cluster setups. (This used to be commit 8e0fa453a3d0a2c997a935b6940796612c972708)
2008-03-11Clean up add_mapping_entry slightlyVolker Lendecke1-9/+11
(This used to be commit 38bb69cb316ba605a6d3a4454b986cb63ace3c21)
2008-03-11Cleanup after pstring removalVolker Lendecke1-1/+1
(This used to be commit 66d2a9c87411be88269bbb3a4d3c0a218a55be06)
2008-01-15Fix "status used uninitialized" warnings.Jeremy Allison1-1/+1
Jeremy. (This used to be commit e57856fff2ef86481ac6770c7d010a26666d8bdd)
2008-01-09Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.Michael Adam1-3/+6
Michael (This used to be commit 6b2b9a60ef857ec31da5fea631535205fbdede4a)
2008-01-09Don't leak data.dptr on error path.Michael Adam1-3/+5
Michael (This used to be commit d14de0692c623ff07dada45a3d7bec03ceca2b7e)
2007-12-15s/sid_to_string/sid_to_fstring/Volker Lendecke1-8/+8
least surprise for callers (This used to be commit eb523ba77697346a365589101aac379febecd546)
2007-12-15Replace sid_string_static with sid_to_stringVolker Lendecke1-1/+2
This adds 28 fstrings on the stack, but I think an fstring on the stack is still far better than a static one. (This used to be commit c7c885078be8fd3024c186044ac28275d7609679)
2007-12-15Replace sid_string_static by sid_string_dbg in DEBUGsVolker Lendecke1-2/+3
(This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
2007-12-15Fix a segfaultVolker Lendecke1-2/+2
sid_to_string still expects a fstring (This used to be commit 1f352cdd1976ad36484e146165df585b88ec5527)