Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
regdb_store_values_internal() doesn't always free its stackframe.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
regdb_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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
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
|
|
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.
|
|
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Dec 3 05:20:30 CET 2011 on sn-devel-104
|
|
It is importante to not use the database backend implementation
in the upgrade. Otherwise this would only work as long as this
is the newset version. In future versions of the registry, this
(then) intermediate upgrade step would change in behaviour and not
work as expected any more.
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Skip the transaction for the upgrade code, if the database
is already at code-level.
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov 9 15:06:59 CET 2011 on sn-devel-104
|
|
Assume REGDB_VERSION_V1 if no version key found in registry.tdb
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
incomlete keys
Originally, this function did not create the key's subkey list record if only
the record was listed in the subkeylist of its parent key. Now this is fixed.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
|
|
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.
|
|
Avoid direct use of the db_record and db_context structs
|
|
dbwrap_fetch_bystring_upper() to NTSTATUS
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Sep 19 10:31:45 CEST 2011 on sn-devel-104
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Sep 7 19:47:49 CEST 2011 on sn-devel-104
|
|
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Sep 2 11:47:11 CEST 2011 on sn-devel-104
|
|
This is to not use the precise code version REGDB_VERSION_V3 explicitly
in the code.
|
|
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Sep 2 00:51:40 CEST 2011 on sn-devel-104
|
|
This adds the runtime check for changed regdb format version to store_values
|
|
return code
|
|
directly in the registry db code.
This verifies the regdb format version number before the corresponding write operations.
|
|
regdb version
If the version has changed since initialization, the write will
fail with ACCESS_DENIED.
|
|
to 0
|
|
list security records for the INFO/version key ...
|
|
INFO/version key ...
|
|
INFO/version (and use it)
|
|
This also fixes the earlier faulty handing in of a useless stackframe
memory context via private_data.
|
|
This also fixes broken private_data parameter for the traverse function
(making use of it): Originally a memory context was handed in but was not used.
|
|
4-byte subkey counter
More precisley, we return false if the record does not match the required
structure of a leading 4-byte subkey counter followed by the corresponding
number zero-terminated strings.
|
|
reg_deletekey_recursive
this changes the complexity from O(n^2) to O(n) and reduces the time of
a 'net conf drop' with 10000 shares from 6min to 1.5s
Signed-off-by: Michael Adam <obnox@samba.org>
|