summaryrefslogtreecommitdiff
path: root/source4/lib/registry/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-03Merge branch 'v4-0-test' into id10ts-registryJelmer Vernooij1-5/+9
(This used to be commit f98b59021a5ea39c7970ebc5520d17775e500b8c)
2008-02-26registry: Implement recursive deletes for ldb-backed registry.Andrew Kroeger1-27/+116
When deleting a registry key that contains subkeys or values, Windows performs a recursive deletion that removes any subkeys or values. This update makes deletes for an ldb-backed registry consistent with Windows. Under ldb, the deletion is done using an explicit transaction. If an error occurs during the deletion the entire transaction is cancelled, leaving the registry as it was before the deletions started. (This used to be commit ca796c8fb10598674a5eef31d15863e79bcf3db8)
2008-02-21Remove more global_loadparm instance.sJelmer Vernooij1-5/+9
(This used to be commit a1280252ce924df69d911e597b7f65d8038abef9)
2008-02-09registry: Fix warning.Jelmer Vernooij1-1/+1
(This used to be commit dad809030478a85ac13a73bce9c07314792f01c2)
2008-01-18registry: Use correct return values.Jelmer Vernooij1-7/+28
(This used to be commit 98ebdbe52fd615ea62a3caa17acfe8bb31b8f85d)
2008-01-18When Windows attempts to create a new key, it looks for an available key nameAndrew Kroeger1-7/+13
starting with "New Key #1" and iterating up to "New Key #99" before giving up. ldb_open_key() calls reg_path_to_ldb() to build the appropriate dn from the key name. reg_path_to_ldb() was not catching the error returned by ldb_dn_add_base_fmt() due to the unescaped '#' character, causing the returned dn to be that of the parent key, not the potential new key. Additionally, Windows expects a return value of WERR_BADFILE when a key does not exist, but WERR_NOT_FOUND was being returned instead. Correcting the building of the dn and the providing the expected return value allows new key creation to succeed. When attempting to delete a key, Windows passes the complete path to the key, not just the name of the child key to be deleted. Using reg_path_to_ldb() to build the correct dn allows key deletion to succeed. (This used to be commit d57792d67b865ef43e7f21640b158862627f4b45)
2008-01-18registry: Improve error codes and update tests.Jelmer Vernooij1-3/+6
Rather than map the error returned by the registry to the correct error, return the correct error in the first place. Also deal with the fact that the right error code is now returned in a couple of places. (This used to be commit 1e31fcb8a097810a97e2d4bb1f243f1b34cc2415)
2008-01-18When Windows initially creates a new value, the value name is "New Value #1".Andrew Kroeger1-2/+22
The '#' character was causing problems, as it was not being escaped for the dn, but the failure returned by ldb_dn_add_child_fmt() was not being caught. This was causing the new value to be added on the parent key, not the current key. When attempting to delete the new value (now on the parent key) the same escaping error was returned by ldb_dn_add_child_fmt(), causing the delete to delete the key and not the value. When attempting to rename a value, Windows first tries to ensure the new name does not already exist. When a value does not exist, Windows expects a return value of WERR_BADFILE, but WERR_NOT_FOUND was being returned instead. Providing the WERR_BADFILE that Windows expects allows values to be renamed. (This used to be commit 94fb39cfd967455ce5a554720c1c7e6183f91056)
2008-01-18registry: Properly check return values from ldb_*() functions.Andrew Kroeger1-3/+3
There were a few cases left that attempted to detect errors from ldb_*() function calls using "(ret < 0)". As all LDB_* error codes are greater than zero, there was no chance any errors would be detected. Changed all such tests to use "(ret != LDB_SUCCESS)". (This used to be commit 0ed6f1b1628da5b922f02a5f9a6c60071b6277f2)
2008-01-18registry: Check for more specific LDB return codes, handle changing existing ↵Jelmer Vernooij1-6/+11
values better. (This used to be commit c8b22ef30c7fc0ccc15e9fc9a38fdc639fc4b976)
2008-01-07r26692: registry: Treat key and value names case-insensitively.Jelmer Vernooij1-0/+10
(This used to be commit 9fc5f098e01145db5b01efb0bf22cdddf0213d20)
2008-01-07r26689: registry: Return max_subkeynamelen, max_valnamelen and ↵Jelmer Vernooij1-3/+49
max_valbufsize in getkeyinfo(). (This used to be commit b06896d2378e536f5044dbe500a5232a89d6d0b5)
2007-12-21r26518: Fix provision of registry using Python.Jelmer Vernooij1-1/+1
(This used to be commit 12eb38e553993b2726a803af4ae9c05229d6ebe4)
2007-12-21r26451: Janitorial: fix warnings in lib/registry/Kai Blin1-1/+1
This does not fix the discarded qualifier warnings in tests, as the test data is currently passed as const. Jelmer wants to provide a test function that passes non-const test data, thus allowing for a cleaner way to fix those warnings. (This used to be commit 46dfa63d4f7381c5c6ce3f4b8b0bd9aa9e16950c)
2007-12-21r26443: Remove global_loadparm instances.Jelmer Vernooij1-0/+1
(This used to be commit 8242c696235d1bfb402b5c276a57f36d93610545)
2007-12-21r26429: Avoid use of global_smb_iconv_convenience.Jelmer Vernooij1-2/+2
(This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c)
2007-12-21r26316: Use contexts for conversion functions.Jelmer Vernooij1-2/+2
(This used to be commit f6420d933b5b011d428974f3a2a57edf19e6f482)
2007-12-21r26263: Don't assume CH_UNIX is CH_UTF8.Jelmer Vernooij1-1/+1
(This used to be commit 69157be9b180e4d82a66257afb5f774ef16cea89)
2007-12-21r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies.Jelmer Vernooij1-1/+1
(This used to be commit 56dfcb4f2f8e74c9d8b2fe3a0df043781188a555)
2007-10-10r25544: Cleanup some more indents in lib/registry.Günther Deschner1-68/+86
Guenther (This used to be commit 0d9826dc54057db2cfebcb806e5442c4dcf60daa)
2007-10-10r25446: Merge some changes I made on the way home from SFO:Jelmer Vernooij1-4/+6
2007-09-29 More higher-level passing around of lp_ctx. 2007-09-29 Fix warning. 2007-09-29 Pass loadparm contexts on a higher level. 2007-09-29 Avoid using global loadparm context. (This used to be commit 3468952e771ab31f90b6c374ade01c5550810f42)
2007-10-10r24898: Fix LOCAL-REGISTRY, do not silently ignore testcase setup failures.Jelmer Vernooij1-2/+1
(This used to be commit 527ea7fccf4ace9cd9cbacf49820ecd208b8d570)
2007-10-10r24684: Be a bit less verboseJelmer Vernooij1-2/+2
(This used to be commit 7a7af62dc4485d832436ed39dfba41b417ec2b10)
2007-10-10r24667: Finally merge the registry improvements that Wilco Baan Hofman and I ↵Jelmer Vernooij1-0/+501
have been working on for at least half a year now. Contains the following improvements: * proper layering (finally!) for the registry library. Distinction is now made between 'real' backends (local, remote, wine, etc) and the low-level hive backends (regf, creg, ldb, ...) that are only used by the local registry backend * tests for all important hive and registry operations * re-enable RPC-WINREG tests (still needs more work though, as some return values aren't checked yet) * write support for REGF files * dir backend now supports setting/reading values, creating keys * support for storing security descriptors * remove CREG backend as it was incomplete, didn't match the data model and wasn't used at all anyway * support for parsing ADM files as used by the policy editor (see lib/policy) * support for parsing PREG files (format used by .POL files) * new streaming interface for registry diffs (improves speed and memory usage for regdiff/regpatch significantly) ... and fixes a large number of bugs in the registry code (This used to be commit 7a1eec6358bc863dfc671c542b7185d3e39d7b5a)