summaryrefslogtreecommitdiffstats
path: root/source3/registry
Commit message (Collapse)AuthorAgeFilesLines
* s3:registry: use discard_const_p() to avoid const warning in smb_iconv() defineStefan Metzmacher2014-11-251-1/+1
| | | | | | | | | I'm wondering why we have this in reg_parse_internal.h at all! But for now just fix warnings... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* registry: Slightly simplify tdb_data_is_cstrVolker Lendecke2014-11-131-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* reg_perfcount: don't leak state_path onto talloc tosDavid Disseldorp2014-11-031-39/+84
| | | | | | | | | reg_perfcount currently uses a counters_directory() helper to return the counter specific tdb path. Fix leaks and error checking in the helper function and all callers. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* reg_backend_db: don't leak state_path onto talloc tosDavid Disseldorp2014-11-031-9/+28
| | | | | | | | Also check for allocation failures, and ensure that the regdb refcount is not set by regdb_open() on failure. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* registry: Don't leave dangling transactionsVolker Lendecke2014-10-081-1/+1
| | | | | | | | When a createkey fails due to access denied, we need to do a transaction_cancel. Otherwise the lock on the db will stay around. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib: directory_create_or_exist() does not use "uid" parameterVolker Lendecke2014-07-281-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Use root_mode() to get uid_wrapper working correctly.Andreas Schneider2014-04-171-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:registry: fix invalid pointer type warning in reg_format.cStefan Metzmacher2014-04-021-1/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:registry: introduce REG_DBWRAP_FLAGS to use for all db_open callsMichael Adam2014-02-072-3/+4
| | | | | | | This is in accordance with the use of REG_TDB_FLAGS. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@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-registry: fix typo in DEBUG statement.Günther Deschner2014-01-071-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:registry increase a debug levelChristian Ambach2013-04-191-1/+1
| | | | | | | do not clutter the logs Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org>
* s3:registry accept windows like long hivenamesGregor Beck2013-03-201-3/+9
| | | | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Mar 20 17:08:52 CET 2013 on sn-devel-104
* s3-registry: Fix counters_directory() dir creation.Andreas Schneider2012-12-121-2/+2
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3-registry: Check return code of push_reg_sz().Andreas Schneider2012-12-121-2/+11
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-reg: Fix copy and paste error in debug message.Andreas Schneider2012-11-301-2/+2
| | | | Found by coverity.
* lib/util/charset: We do not use fucntions from wchar.h any moreAndrew Bartlett2012-09-261-1/+0
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 26 02:13:10 CEST 2012 on sn-devel-104
* s3/registry: fix compile warning on openindianaBjörn Jacke2012-08-231-1/+1
|
* Check error returns from strupper_m() (in all reasonable places).Jeremy Allison2012-08-092-2/+7
|
* Fix bug 9065: source3/registry/regfio.c: bad call to memcpyDavid Binderman2012-07-251-1/+1
| | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 25 02:42:32 CEST 2012 on sn-devel-104
* source3/registry/reg_backend_db.c: fix stackframe leakRusty Russell2012-07-181-2/+4
| | | | | | | regdb_store_values_internal() doesn't always free its stackframe. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3:registry: untangle assignment from check in reg_enumkey()Michael Adam2012-07-051-1/+2
| | | | | Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 5 17:57:16 CEST 2012 on sn-devel-104
* s3:registry: untangle assignment from check in reg_enumvalue()Michael Adam2012-07-051-1/+2
|
* s3:registry: change reg_import.c according to coding guidelines.Michael Adam2012-06-271-53/+47
| | | | | Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Jun 27 10:07:54 CEST 2012 on sn-devel-104
* s3:registry: use TALLOC_CTX * instead of const void * in reg_import_adapter()Michael Adam2012-06-272-2/+2
|
* s3:registry: add function registry_value_cmp()Gregor Beck2012-06-262-0/+10
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:registry: fix possible double free in importGregor Beck2012-06-261-0/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:registry: improve debug output in reg_parseGregor Beck2012-06-261-1/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:registry: add functions to conveniently create registry_valuesGregor Beck2012-06-262-0/+65
| | | | Pair-Programmed-With: Michael Adam <obnox@samba.org>
* s3:registry: silence net_deletekey_recursiveGregor Beck2012-06-261-4/+4
| | | | | | WERR_BADFILE may not be an error for the caller because the result is the same. Signed-off-by: Michael Adam <obnox@samba.org>
* s3:registry: make reg_delete_path() delete the path recursively.Michael Adam2012-06-261-3/+3
| | | | | Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> (cherry picked from commit a56992ab71032b54d9879834c12f6b88e6174cb4)
* s3:registry: compile reg_create_path() & reg_delete_path()Gregor Beck2012-06-262-7/+0
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_trans_store_int32->dbwrap_trans_store_int32_bystringVolker Lendecke2012-06-151-1/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystringVolker Lendecke2012-06-151-2/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:registry: let reg_values_need_update() return true if the backend does ↵Michael Adam2012-05-071-1/+1
| | | | | | | | | not implement the method Otherwise the value cache might become outdated. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon May 7 16:11:05 CEST 2012 on sn-devel-104
* s3:registry: let reg_subkeys_need_update() return true if the backend does ↵Michael Adam2012-05-071-1/+1
| | | | | | not implement the method Otherwise the subkey cache might become outdated.
* s3:registry: implement values_need_update and subkeys_need_update in the ↵Michael Adam2012-05-051-0/+11
| | | | | | | | | | smbconf backend It simply calls to the regdb functions. This fixes a caching issue uncovered by recent changes. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Sat May 5 04:10:43 CEST 2012 on sn-devel-104
* s3:registry: return error when Key does not exist in ↵Michael Adam2012-05-051-0/+3
| | | | regdb_fetch_values_internal()
* s3: Remove an unused variableVolker Lendecke2012-04-261-1/+0
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Thu Apr 26 12:17:14 CEST 2012 on sn-devel-104
* s3:registry: replace call to reg_openkey() in reg_createkey() by accesscheck.Michael Adam2012-04-251-8/+10
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: remove a superfluous fill_subkey_cache() in reg_createkey()Michael Adam2012-04-251-5/+0
| | | | | | Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: use fill_subkey_cache to check exsistence in ↵Michael Adam2012-04-251-11/+2
| | | | | | | | regkey_open_onelevel(). Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: let fill_subkey_cache return WERR_BADFILE when the subkey list ↵Michael Adam2012-04-251-1/+1
| | | | | | | | | | could not be loaded WERR_NO_MORE_ITEMS seems inappropriate. Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: convert reg_openkey() to use talloc instead of SMB_STRDUP etcMichael Adam2012-04-251-15/+12
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry untangle an assignment from the check in regkey_open_onelevel()Michael Adam2012-04-251-1/+2
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: untangle assignment from check in regkey_open_onelevel()Michael Adam2012-04-251-1/+2
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: fix seqnum race in regdb_fetch_keys_internalMichael Adam2012-04-251-3/+22
| | | | | | | | | | | This prevents race between fetching seqnum and key content. Because there is currently no way to atomically fetch the record along with the seqnum, I use a loop. This is far from optimal and should should ideally be done differently. But for now it fixes the race. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: fix seqnum race in fetch_values_internalMichael Adam2012-04-251-3/+21
| | | | | | | | | | | This prevents race between fetching seqnum and key content. Because there is currently no way to atomically fetch the record along with the seqnum, I use a loop. This is far from optimal and should should ideally be done differently. But for now it fixes the race. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry: update the seqnum in the subkey cache at the end of ↵Michael Adam2012-04-251-1/+5
| | | | | | | | | | | | | regval_store_keys The purpose is to prevent next reads from going to disk. Note that this will currently only be effective with local tdbs, not with ctdb: For tdb, store and delete bump the seqnum while transaction commit does not. For ctdb, transaction commit bumps the seqnum, while store and delete don't... This needs fixing (in ctdb). Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:registry:db: update the value container seqnum after storing/deleting to ↵Michael Adam2012-04-251-1/+22
| | | | | | | | | | | | prevent next read from going to disk if possible Note that this will currently only be effective in the local TDB implementation. For CTDB, this wont work since seqnum currently works differently there (needs fixing): For tdb, store and delete operations bump the db seqnum, while transaction commits don't. For ctdb, the seqnum is bumped by the transaction commit but not by store and delete operations. Signed-off-by: Andreas Schneider <asn@samba.org>