1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

919 Commits

Author SHA1 Message Date
Günther Deschner
5d4ff51253 werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in source3/registry/reg_api_regf.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:20 +02:00
Günther Deschner
f19dcbbb58 werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/registry/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:18 +02:00
Günther Deschner
22a514f992 werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/registry/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Günther Deschner
49c5e4fbce s3-registry: create winprint print processor entry for x64 as well.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:26 +02:00
Michael Adam
8f158bab9f s3:registry: use dbwrap_purge_bystring instead of dbwrap_delete_bystring
where appropriate

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-03-01 21:50:24 +01:00
Michael Adam
476672b647 dlist: remove unneeded type argument from DLIST_ADD_END()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:17 +01:00
Mathieu Parent
c315fce17e Fix various spelling errors
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Nov  6 13:43:45 CET 2015 on sn-devel-104
2015-11-06 13:43:45 +01:00
Volker Lendecke
6438339b2a lib: Remove unused functions
This fixes CID 1034629 Unchecked return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-23 22:12:09 +02:00
Anoop C S
b4db69f0de source3/registry: Fix CID 1273100 Stray semicolon
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-15 19:56:45 +02:00
Anoop C S
d201e94f5b source3/registry: Fix CID 1273421 Useless call
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-15 19:56:45 +02:00
Richard Sharpe
4602c86d58 Convert uint64 to uint64_t
We seemed to have very few uses of that.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-15 19:31:24 +02:00
Richard Sharpe
57568f1900 Convert all uint32/16/8 to _t in a grab-bag of remaining files.
I still need to fix the rpc stuff, but we are almost there.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104
2015-05-14 22:16:56 +02:00
Richard Sharpe
ddcf0565bb Convert all uses of uint32/16/8 to _t in source3/registry.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-12 01:32:12 +02:00
Richard Sharpe
07d3ba435a Change the registry subsystem to use uint32_t from uint32. Also change session.h.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 16 00:37:28 CEST 2015 on sn-devel-104
2015-04-16 00:37:28 +02:00
Anoop C S
fbb2d4929f registry: Fix 1273042 Identical code for if/else branch
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-03-26 14:54:20 +01:00
Volker Lendecke
cf368cbdc5 lib: Remove tdb_fetch_compat
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:52 +01:00
Volker Lendecke
3e9e5e6d6f registry: Fix an aligment increase warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 26 05:35:33 CET 2015 on sn-devel-104
2015-02-26 05:35:33 +01:00
Christian Ambach
4b41489901 s3:registry/regfio fix some valgrind warnings
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-02 22:21:06 +01:00
Christian Ambach
217a0189c1 s3:registry/regfio read SD from the correct location
try to find the security descriptor at the data pointer, not at the beginning of the hbin

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9629

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-02 22:21:06 +01:00
Volker Lendecke
46f27a8f78 registry3: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-26 23:20:04 +01:00
Stefan Metzmacher
7a0b8a9a6e s3:registry: use discard_const_p() to avoid const warning in smb_iconv() define
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>
2014-11-25 07:25:45 +01:00
Volker Lendecke
2dab2f0f73 registry: Slightly simplify tdb_data_is_cstr
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-13 22:10:08 +01:00
David Disseldorp
587b21646c reg_perfcount: don't leak state_path onto talloc tos
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>
2014-11-03 23:46:04 +01:00
David Disseldorp
4b6af0dfa7 reg_backend_db: don't leak state_path onto talloc tos
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>
2014-11-03 23:46:04 +01:00
Volker Lendecke
4237138c46 registry: Don't leave dangling transactions
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>
2014-10-08 15:54:04 +02:00
Volker Lendecke
f5efddb9ae lib: directory_create_or_exist() does not use "uid" parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-28 22:04:13 +02:00
Andreas Schneider
6118c2ec2c s3: Use root_mode() to get uid_wrapper working correctly.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Stefan Metzmacher
5964d4969e s3:registry: fix invalid pointer type warning in reg_format.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:43 +02:00
Michael Adam
906abe55cb s3:registry: introduce REG_DBWRAP_FLAGS to use for all db_open calls
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>
2014-02-07 16:06:07 +01:00
Michael Adam
cf0cb0add9 dbwrap: add a dbwrap_flags argument to db_open()
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>
2014-02-07 16:06:06 +01:00
Günther Deschner
53bff63383 s3-registry: fix typo in DEBUG statement.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 16:59:37 +01:00
Christian Ambach
47f8e21043 s3:registry increase a debug level
do not clutter the logs

Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
2013-04-19 13:16:38 +02:00
Gregor Beck
f7564cae4c s3:registry accept windows like long hivenames
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
2013-03-20 17:08:51 +01:00
Andreas Schneider
76ac4d923d s3-registry: Fix counters_directory() dir creation.
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-12 15:00:02 +01:00
Andreas Schneider
ff32391808 s3-registry: Check return code of push_reg_sz().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2012-12-12 09:42:32 +01:00
Andreas Schneider
aa7f406317 s3-reg: Fix copy and paste error in debug message.
Found by coverity.
2012-11-30 14:02:53 +01:00
Andrew Bartlett
3902e7332d lib/util/charset: We do not use fucntions from wchar.h any more
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep 26 02:13:10 CEST 2012 on sn-devel-104
2012-09-26 02:13:10 +02:00
Björn Jacke
cbcfd85f41 s3/registry: fix compile warning on openindiana 2012-08-23 16:43:48 +02:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
David Binderman
d58aa46c08 Fix bug 9065: source3/registry/regfio.c: bad call to memcpy
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
2012-07-25 02:42:32 +02:00
Rusty Russell
15faffc537 source3/registry/reg_backend_db.c: fix stackframe leak
regdb_store_values_internal() doesn't always free its stackframe.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:06:31 +09:30
Michael Adam
5ba91fff94 s3:registry: untangle assignment from check in reg_enumkey()
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul  5 17:57:16 CEST 2012 on sn-devel-104
2012-07-05 17:57:16 +02:00
Michael Adam
e481afc0fe s3:registry: untangle assignment from check in reg_enumvalue() 2012-07-05 16:07:40 +02:00
Michael Adam
dba03a644d s3:registry: change reg_import.c according to coding guidelines.
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Jun 27 10:07:54 CEST 2012 on sn-devel-104
2012-06-27 10:07:54 +02:00
Michael Adam
7bc1172c5f s3:registry: use TALLOC_CTX * instead of const void * in reg_import_adapter() 2012-06-27 08:18:18 +02:00
Gregor Beck
e78d647ebc s3:registry: add function registry_value_cmp()
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:19 +02:00
Gregor Beck
55ce9e1fa9 s3:registry: fix possible double free in import
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
619f0c07ff s3:registry: improve debug output in reg_parse
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
e10ea2b3cd s3:registry: add functions to conveniently create registry_values
Pair-Programmed-With: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
35eccd0f53 s3:registry: silence net_deletekey_recursive
WERR_BADFILE may not be an error for the caller because the result is the same.

Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Michael Adam
fb706c7365 s3:registry: make reg_delete_path() delete the path recursively.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit a56992ab71032b54d9879834c12f6b88e6174cb4)
2012-06-26 19:57:18 +02:00
Gregor Beck
353f614c96 s3:registry: compile reg_create_path() & reg_delete_path()
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Volker Lendecke
64fec465c1 dbwrap: dbwrap_trans_store_int32->dbwrap_trans_store_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:29 +02:00
Volker Lendecke
737c0a5473 dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Michael Adam
4754743860 s3:registry: let reg_values_need_update() return true if the backend does 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
2012-05-07 16:11:05 +02:00
Michael Adam
fb58951f93 s3:registry: let reg_subkeys_need_update() return true if the backend does not implement the method
Otherwise the subkey cache might become outdated.
2012-05-07 14:09:09 +02:00
Michael Adam
16a24dc182 s3:registry: implement values_need_update and subkeys_need_update in the 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
2012-05-05 04:10:42 +02:00
Michael Adam
cd98954c6d s3:registry: return error when Key does not exist in regdb_fetch_values_internal() 2012-05-05 02:22:00 +02:00
Volker Lendecke
05456aca34 s3: Remove an unused variable
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 26 12:17:14 CEST 2012 on sn-devel-104
2012-04-26 12:17:13 +02:00
Michael Adam
c333885fa1 s3:registry: replace call to reg_openkey() in reg_createkey() by accesscheck.
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:12 +02:00
Michael Adam
7f205bcbf2 s3:registry: remove a superfluous fill_subkey_cache() in reg_createkey()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:12 +02:00
Michael Adam
4b7817aa80 s3:registry: use fill_subkey_cache to check exsistence in regkey_open_onelevel().
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:12 +02:00
Michael Adam
be2cb08e40 s3:registry: let fill_subkey_cache return WERR_BADFILE when the subkey list 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>
2012-04-25 14:31:12 +02:00
Michael Adam
1703e6fe09 s3:registry: convert reg_openkey() to use talloc instead of SMB_STRDUP etc
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:12 +02:00
Michael Adam
323ec9f9b4 s3:registry untangle an assignment from the check in regkey_open_onelevel()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:12 +02:00
Michael Adam
640cecab19 s3:registry: untangle assignment from check in regkey_open_onelevel()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:11 +02:00
Michael Adam
22451f7f45 s3:registry: fix seqnum race in regdb_fetch_keys_internal
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>
2012-04-25 14:31:11 +02:00
Michael Adam
7ea8bd3605 s3:registry: fix seqnum race in fetch_values_internal
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>
2012-04-25 14:31:11 +02:00
Michael Adam
ab83005b30 s3:registry: update the seqnum in the subkey cache at the end of 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>
2012-04-25 14:31:11 +02:00
Michael Adam
4367071f62 s3:registry:db: update the value container seqnum after storing/deleting to 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>
2012-04-25 14:31:11 +02:00
Michael Adam
8c7047b0e7 s3:registry: wrap reg_deletekey() into a transaction
This is wrong layering but fixes a race condition.

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:11 +02:00
Michael Adam
32ac4f4b34 s3:registry: wrap reg_createkey() in a transaction
This is wrong layering (calling into regdb_transaction* in the reg_api code)
but fixes a potential race. It makes the multi-step create procedure atomic.

This should completely be done in the backend.

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:10 +02:00
Michael Adam
1af68be008 s3:registry: untangle assignments from checks in reg_createkey()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:10 +02:00
Michael Adam
8d19ac7474 s3:registry: wrap reg_deletevalue() in a transaction
This is at the wrong layer, but if fixes a race potentially causing
data corruption by concurrent access.

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:10 +02:00
Michael Adam
97bf05871a s3:registry: untangle assignment from check in reg_deletevalue()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:10 +02:00
Michael Adam
8ddc2aa0e1 s3:registry: fix race in reg_setvalue that could lead to data corruption
(there was no lock around fetching the values and storing them)

The layering is wrong in that it uses regdb transactions in reg_api

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:10 +02:00
Michael Adam
705ea5b8c2 s3:registry: untangle assignment from check and add a debugmessage in reg_setvalue()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:10 +02:00
Michael Adam
04aa303fb1 s3:registry: don't leak the old contents when updating the value cache
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:09 +02:00
Michael Adam
f4747250ea s3:registry: fix debug message in regdb_store_values_internal()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:09 +02:00
Michael Adam
44159330db s3:registry: improve log message in regdb_unpack_values()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:09 +02:00
Michael Adam
6f67f5d5b7 s3:registry: fix a debug message typo
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:09 +02:00
Michael Adam
64a9ab4f82 s3:registry: add a new function regval_ctr_value_byname()
This is like regval_ctr_key_exists() but does not return bool,
but the regval_blob instead, if found, and NULL if not found.

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:31:01 +02:00
Michael Adam
2fc610caf5 s3:registry: rename regval_ctr_key_exists() to regval_ctr_value_exists()
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:05 +02:00
Michael Adam
6c016734aa s3:registry:reg_api: fix reg_queryvalue to not fail when values are modified while it runs
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:05 +02:00
Michael Adam
877af95ed7 s3:registry: make regdb_values_need_update() static
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:05 +02:00
Michael Adam
bc48100530 s3:registry: make regdb_subkeys_need_update() static
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:05 +02:00
Michael Adam
a3b1c13cd4 s3:registry: make regdb_store_values() static
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:04 +02:00
Michael Adam
6ab2eb8295 s3:registry: make regdb_fetch_values() static
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:04 +02:00
Michael Adam
5fdd602605 s3:registry: make regdb_fetch_keys() static
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:04 +02:00
Michael Adam
4cf44177ac s3:registry: make regdb_store_keys() static
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:04 +02:00
Michael Adam
37715930c2 s3:registry: printing backend: use regdb options via ops struct, not directly
just like the other backends.

This is in preparation of making the backend functions private

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:04 +02:00
Olaf Flebbe
b8dea7e82d Wrong assertion/comparison: Compare value not pointer
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 13 02:23:36 CEST 2012 on sn-devel-104
2012-04-13 02:23:35 +02:00
Jelmer Vernooij
6f1b735cc2 adt_tree: Avoid WERROR. 2012-03-24 16:41:35 +01:00
Andrew Bartlett
3b5326e987 s3-registry Remove unused dup_registry_value() and free_registry_value() 2012-02-17 12:19:29 +01:00
Andrew Bartlett
7824fd5954 s3-registry: Remove unused prs_uint8()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:12 +11:00
Gregor Beck
f1545048eb s3:registry: do not write empty value lists to registry.tdb
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Jan 24 13:54:09 CET 2012 on sn-devel-104
2012-01-24 13:54:09 +01:00
Volker Lendecke
45e61fcf61 s3: Add a "lock_order" argument to db_open
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.
2012-01-18 14:48:04 +01:00
David Disseldorp
bd5fe0a333 s3-perfcount: fix incorrect array length calculations
As reported by Ismail Doenmez (idonmez@suse.com), sizeof() is
incorrectly used by _reg_perfcount_init_data_block() in an attempt to
determine the length of a talloced array.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jan  4 16:54:37 CET 2012 on sn-devel-104
2012-01-04 16:54:37 +01:00
Volker Lendecke
75d3b9ce08 s3: Fix some False/NULL hickups
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
2011-12-20 13:13:17 +01:00
Michael Adam
2a69de6fde s3:registry: replace use of rawmemchr by portable equivalent use of strchr. 2011-12-06 10:45:42 +01:00