summaryrefslogtreecommitdiffstats
path: root/source3/passdb/pdb_tdb.c
Commit message (Collapse)AuthorAgeFilesLines
* param: rename lp function and variable from "renameuser_script" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "rename_user_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-071-3/+3
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:passdb/pdb_tdb add parameter to control handling of BUILTINChristian Ambach2013-06-211-0/+10
| | | | | | | | | with tdbsam:map builtin, one can control if tdbsam should be used to map entries from BUILTIN or not. By default, they will be mapped (as in older releases) Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Correctly check for errors in strlower_m() returns.Jeremy Allison2012-08-091-7/+21
|
* s3: Fix Coverity ID 710803 Resource leakVolker Lendecke2012-07-311-0/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-1/+1
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* dbwrap: ↵Volker Lendecke2012-06-151-2/+2
| | | | | | dbwrap_trans_change_uint32_atomic->dbwrap_trans_change_uint32_atomic_bystring Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystringVolker Lendecke2012-06-151-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystringVolker Lendecke2012-06-151-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystringVolker Lendecke2012-06-151-4/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystringVolker Lendecke2012-06-151-7/+8
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3: Add a "lock_order" argument to db_openVolker Lendecke2012-01-181-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.
* s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return typeMichael Adam2011-10-111-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
* s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return typeMichael Adam2011-10-111-6/+10
| | | | for consistency and better error propagation
* s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of ↵Michael Adam2011-10-111-2/+3
| | | | | | bool) for consistency and better error propagation
* s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return codeMichael Adam2011-10-111-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.
* s3:passdb: convert pdb_tdb to use dbwrap wrapper functions.Michael Adam2011-10-111-46/+61
| | | | Avoid direct use of the db_record and db_context structs
* s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam2011-10-111-5/+6
| | | | dbwrap_fetch_bystring_upper() to NTSTATUS
* s3-passdb: split out passdb/pdb_tdb.h.Günther Deschner2011-10-101-0/+1
| | | | Guenther
* 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: only include tdb headers where needed.Günther Deschner2011-05-061-0/+1
| | | | Guenther
* s3-passdb: add passdb.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-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
* s3-build: use dbwrap.h only where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2010-05-211-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>
* s3:passdb: use transaction_wrapped write in tdbsam_new_rid()Michael Adam2009-07-291-1/+2
| | | | | | Now all tdb writes in passdb use transactions. Michael
* s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.Michael Adam2009-07-291-3/+5
| | | | Michael
* Turn the pdb_rid_algorithm into a capabilities call that returns flagsVolker Lendecke2009-06-281-3/+3
|
* Allow pdbedit to change a user rid/sid. Based on a fix from Alexander ↵Jeremy Allison2009-04-011-3/+57
| | | | | | Zagrebin <alexz@visp.ru>. Jeremy.
* s3: fix the fix for bug #6195 - dont let smbd child processes panicMichael Adam2009-04-011-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
* Fix the problem of 3.0.x passdb databases being versionJeremy Allison2009-03-271-5/+43
| | | | | | | 3 but using a different hash calculation than 3.2.x passwd databases (also version 3). Introduces a minor version number. Jeremy.
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-03-271-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.
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-03-181-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.
* Missing break in conversion function prevents tdb password database update.Alexander Zagrebin2009-03-171-0/+1
|
* Shape up pdb_search a bit by making it a talloc ctx with a destructorVolker Lendecke2009-03-071-7/+4
|
* Fix bug #6117 - Samba 3.3.0: pdbedit -a core dumps.Jeremy Allison2009-02-171-1/+12
| | | | Jeremy.
* s3:pdb_tdb: store the next rid counter in passdb.tdb instead of ↵Stefan Metzmacher2008-12-291-75/+47
| | | | | | | | winbind_idmap.tdb This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4. metze
* s3:passdb: make marshalling struct samu from and to a buffer more genericStefan Metzmacher2008-12-291-651/+15
| | | | | | | This marshalling isn't specific to tdbsam and it's ugly to have the related functions in two different files. metze
* fixed lots of places that paniced on a failed transaction_commit,Andrew Tridgell2008-08-131-4/+5
| | | | | thinking it was a failure of a transaction cancel (This used to be commit 22dbe158ed62ae47bbcb41bba3db345294f75437)
* first cut at adding full transactions for ctdb to samba3Andrew Tridgell2008-08-131-1/+1
| | | | (This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
* pdb_tdb: fix the upgrade code, db_traverse returns the number of records!Stefan Metzmacher2008-04-151-1/+3
| | | | | metze (This used to be commit baaf571d540ace5119c528fd35bceab335bd6741)
* pdb_tdb: use != 0 instead off == -1 for dbwrap functionsStefan Metzmacher2008-04-011-1/+1
| | | | | metze (This used to be commit d4826a01369c00b5e83cd62c2412a4eb826e216d)
* pdb_tdb: use db_open_trans()Stefan Metzmacher2008-03-271-1/+1
| | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit 9925cc01a2a4739d6cde5991eb0d0b79ae13353b)
* pdb_tdb: use db_sam->transaction_start(db_sam) != 0 consistentStefan Metzmacher2008-03-271-1/+1
| | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit 3bf9ab640e9a79157fcfee0b5d0cde5badc92755)
* Convert pdb_tdb to use dbwrapVolker Lendecke2008-03-171-318/+316
| | | | (This used to be commit 948ab77863b12b1b0bd1c970004b84b9bb1bb2fa)
* Fix CID 469. new_acct can't be NULL here.Jeremy Allison2008-01-121-2/+1
| | | | | Jeremy. (This used to be commit c79e9414c4baed6e61fc6a3f766395b873bcc4ea)
* Make pdb_tdb honour a private dir overridden in smb.conf.Michael Adam2007-12-291-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)
* passdb.tdb is located in the private directoryVolker Lendecke2007-12-291-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)