summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_tdb.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-3/+6
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-10-11s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return typeMichael Adam1-1/+2
for consistency and better error propagation Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return typeMichael Adam1-6/+10
for consistency and better error propagation
2011-10-11s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of ↵Michael Adam1-2/+3
bool) for consistency and better error propagation
2011-10-11s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return codeMichael Adam1-8/+12
Return the int32 value retrieved from the db by reference. Before this, return value "-1" was used as a error indication, but it could also be a valid value from the database.
2011-10-11s3:passdb: convert pdb_tdb to use dbwrap wrapper functions.Michael Adam1-46/+61
Avoid direct use of the db_record and db_context structs
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-5/+6
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-10-10s3-passdb: split out passdb/pdb_tdb.h.Günther Deschner1-0/+1
Guenther
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-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-0/+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-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-1/+1
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>
2009-07-29s3:passdb: use transaction_wrapped write in tdbsam_new_rid()Michael Adam1-1/+2
Now all tdb writes in passdb use transactions. Michael
2009-07-29s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.Michael Adam1-3/+5
Michael
2009-06-28Turn the pdb_rid_algorithm into a capabilities call that returns flagsVolker Lendecke1-3/+3
2009-04-01Allow pdbedit to change a user rid/sid. Based on a fix from Alexander ↵Jeremy Allison1-3/+57
Zagrebin <alexz@visp.ru>. Jeremy.
2009-04-01s3: fix the fix for bug #6195 - dont let smbd child processes panicMichael Adam1-2/+16
This patch makes sure the original and temporary TDBs are closed _before_ the rename. Originally, the open TDB was renamed, and so the name passdb.tdb.tmp stayed around in the db context. Hence upon client connect, the smbd children died because reinit_after_fork() calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which existed no longer... Michael
2009-03-27Fix the problem of 3.0.x passdb databases being versionJeremy Allison1-5/+43
3 but using a different hash calculation than 3.2.x passwd databases (also version 3). Introduces a minor version number. Jeremy.
2009-03-27Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison1-1/+2
correctly. For the clustering case. Clustered setups should have only ever used the unsigned version of TDB_DATA in the first place so they can't be in this mess :-). Just do the normal upgrade in the clustered case. Jeremy.
2009-03-18Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison1-14/+201
correctly. This is a really nasty one to fix as in order to successfully update the passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash values before we do the upgrade. Jeremy.
2009-03-17Missing break in conversion function prevents tdb password database update.Alexander Zagrebin1-0/+1
2009-03-07Shape up pdb_search a bit by making it a talloc ctx with a destructorVolker Lendecke1-7/+4
2009-02-17Fix bug #6117 - Samba 3.3.0: pdbedit -a core dumps.Jeremy Allison1-1/+12
Jeremy.
2008-12-29s3:pdb_tdb: store the next rid counter in passdb.tdb instead of ↵Stefan Metzmacher1-75/+47
winbind_idmap.tdb This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4. metze
2008-12-29s3:passdb: make marshalling struct samu from and to a buffer more genericStefan Metzmacher1-651/+15
This marshalling isn't specific to tdbsam and it's ugly to have the related functions in two different files. metze
2008-08-13fixed lots of places that paniced on a failed transaction_commit,Andrew Tridgell1-4/+5
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-04-15pdb_tdb: fix the upgrade code, db_traverse returns the number of records!Stefan Metzmacher1-1/+3
metze (This used to be commit baaf571d540ace5119c528fd35bceab335bd6741)
2008-04-01pdb_tdb: use != 0 instead off == -1 for dbwrap functionsStefan Metzmacher1-1/+1
metze (This used to be commit d4826a01369c00b5e83cd62c2412a4eb826e216d)
2008-03-27pdb_tdb: use db_open_trans()Stefan Metzmacher1-1/+1
metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit 9925cc01a2a4739d6cde5991eb0d0b79ae13353b)
2008-03-27pdb_tdb: use db_sam->transaction_start(db_sam) != 0 consistentStefan Metzmacher1-1/+1
metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit 3bf9ab640e9a79157fcfee0b5d0cde5badc92755)
2008-03-17Convert pdb_tdb to use dbwrapVolker Lendecke1-318/+316
(This used to be commit 948ab77863b12b1b0bd1c970004b84b9bb1bb2fa)
2008-01-12Fix CID 469. new_acct can't be NULL here.Jeremy Allison1-2/+1
Jeremy. (This used to be commit c79e9414c4baed6e61fc6a3f766395b873bcc4ea)
2007-12-29Make pdb_tdb honour a private dir overridden in smb.conf.Michael Adam1-1/+1
One lp_private_dir() has to be used instead of get_dyn_PRIVATE_DIR() to determine the location of the passdb.tdb. I noticed this when running make test as a "normal user" from a build, where I had done "make install" as root before, and so the passdb.tdb could not be accessed during the startup phase "CREATE TEST ENVIRONMENT IN ./st ..." in selftest.sh. Michael (This used to be commit 1f96389afa7250af7393489fb538b8aed93d815c)
2007-12-29passdb.tdb is located in the private directoryVolker Lendecke1-1/+2
Jerry, as part of d6cdbfd87 the default location of passdb.tdb has changed from the private directory to the state directory. I think because passdb.tdb holds the password hashes, it is reasonable to keep this next to the smbpasswd file. Please review and potentially push. Thanks, Volker (This used to be commit c9c7607c402c0a9df9796c767b689d207d67d8e4)
2007-12-26Remove the sampwent interfaceVolker Lendecke1-146/+0
(This used to be commit 9e80b969fb40766de2c9b1a05d16bf4d4c6e46f7)
2007-12-26Add tdbsam_search_usersVolker Lendecke1-0/+134
(This used to be commit 02f0b0bd393bd942fc934f251bd6afed8e5424b0)
2007-12-10Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison1-1/+1
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-11-20More pstring elimination.Jeremy Allison1-42/+67
Jeremy. (This used to be commit 15074de938539e7a9c527d9a6d81792adc2ac3d0)
2007-11-05static pstring removalVolker Lendecke1-2/+2
(This used to be commit 5490e2d77233f594a42cb32eda8215014db544e3)
2007-11-01Patch 2 of 3 from Debian Samba packagers:Gerald (Jerry) Carter1-2/+2
The point is doing the following associations: - non discardable state data (all TDB files that may need to be backed up) go to statedir - shared data (codepage stuff) go to codepagedir The patch *does not change* the default location for these directories. So, there is no behaviour change when applying it. The main change is for samba developers who have to think when dealing with files that previously pertained to libdir whether they: - go in statedir - go in codepagedir - stay in libdir (This used to be commit d6cdbfd875bb2653e831d314726c3240beb0a96b)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-25/+25
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)
2007-10-10r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell1-2/+1
(This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach1-1/+1
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher1-11/+12
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)