summaryrefslogtreecommitdiffstats
path: root/source/registry
Commit message (Collapse)AuthorAgeFilesLines
* first cut at adding full transactions for ctdb to samba3Andrew Tridgell2008-08-131-3/+3
|
* registry: use _bystring wrappers to dbwrap_trans_(store|delete).Michael Adam2008-08-051-6/+3
| | | | Michael
* registry: bump debug level to 1 in regdb_init() if storing version string fails.Michael Adam2008-07-151-1/+1
| | | | | | Higher level callers should take care of level 0 messages. Michael
* registry: bump debug level to 1 in regdb_init() if opening the registry fails.Michael Adam2008-07-151-1/+1
| | | | | | Higher level callers take care of level 0 messages or more drastic measures. Michael
* registry: fix logic in deleting subkeys record in regdb_fetch_keys().Michael Adam2008-07-091-2/+6
| | | | | | | | | Don't cancel on NT_STATUS_NOT_FOUND error from dbwrap_delete_bystring(). So deletion of an "incomlete" registry key, i.e. one with an entry in the list of subkeys of its parent key but not a subkey list of its own, works again. Michael
* registry: improve logic for deleting value records in regdb_store_keys().Michael Adam2008-07-091-2/+9
| | | | | | | Don't ignore all errors from dbwrap_delete_bystring() but only NT_STATUS_NOT_FOUND. Michael
* registry: fetch regdb_fetch_keys() when a key exists but not its subkey-record.Michael Adam2008-07-081-9/+10
| | | | | | | | | | | | | | According to the new policy a key (that is not a base key) exists, iff it exists in the subkey list of its parent key. Usually this subkeylist is present, but in a transaction-less dbwrap backend (ctdb), a failing write can leave an "incomplete" key without its own subkeylist-record. (Otherwise such an incomplete key can be generated with e.g. tdbtool.) For such a key net registry enumerate (e.g.) would fail. This commit fixes this behaviour of regdb_fetch_keys(). Michael
* registry: add removal of secdesc of a key to regdb_store_keys().Michael Adam2008-05-081-0/+17
| | | | Michael
* registry: add comments to removing lists in regdb_store_keys().Michael Adam2008-05-081-0/+4
| | | | Michael
* registry: change order of deleting value and subkey lists in store_keys().Michael Adam2008-05-081-16/+13
| | | | | | Next step in the plan to make store_keys safer without transactions. Michael
* registry: adapt comment to first step in regdb_store_keys().Michael Adam2008-05-081-1/+1
| | | | Michael
* registry: adapt comment of last step in regdb_store_keys().Michael Adam2008-05-081-1/+1
| | | | | | adding number (3) .... Michael
* registry: regdb_store_keys: move storing the subkey list down after removing ↵Michael Adam2008-05-081-8/+8
| | | | | | values. Michael
* registry: add comment explaining workflow to make store_keys safe w/o ↵Michael Adam2008-05-081-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | transactions /* * Make the store operation as safe as possible without transactions: * * (1) For each subkey removed from ctr compared with old_subkeys: * * (a) First delete the value db entry. * * (b) Next delete the secdesc db record. * * (c) Then delete the subkey list entry. * * (2) Now write the list of subkeys of the parent key, * deleting removed entries and adding new ones. * * (3) Finally create the subkey list entries for the added keys. * * This way if we crash half-way in between deleting the subkeys * and storing the parent's list of subkeys, no old data can pop up * out of the blue when re-adding keys later on. */ The workflow is going to be modified to meet this agendain the next commits. Michael
* registry: check for existence of non base key in regdb_store_keys() before ↵Michael Adam2008-05-081-0/+4
| | | | | | proceeding. Michael
* registry: add a function regdb_key_is_base_key() to check whether is composite.Michael Adam2008-05-081-0/+33
| | | | | | This partly duplicates code from regdb_key_exists(). Maybe refactor later. Michael
* registry: check for existence of key in regdb_set_secdesc() before proceeding.Michael Adam2008-05-081-0/+5
| | | | Michael
* registry: check for existence of key in regdb_get_secdesc() before proceeding.Michael Adam2008-05-081-0/+5
| | | | Michael
* registry: check for existence of key in regdb_store_values() before proceeding.Michael Adam2008-05-081-0/+4
| | | | Michael
* registry: check for existence of key in regdb_fetch_keys() before proceeding.Michael Adam2008-05-081-0/+4
| | | | Michael
* registry: check for existence of key in regdb_fetch_values() first.Michael Adam2008-05-081-0/+4
| | | | | | This uses the new semantics for existence of a key. Michael
* registry: free talloc context on error path in regdb_fetch_values().Michael Adam2008-05-081-1/+1
| | | | Michael
* registry: Implement new semantics for existence of registry key in tdb.Michael Adam2008-05-081-3/+52
| | | | | | | | | | Existence of a key is defined as follows: * If the key is a base key (without separator), the key exists iff the corresponding entry exist in the registry tdb. * If the key is not a base key, the key exists, iff it exists in the list of subkeys of it's parent keyname's tdb entry. Michael
* registry: make normalize_reg_path() strip leading and trailing '/' chars.Michael Adam2008-05-081-7/+26
| | | | Michael
* registry: free temporary data in regdb_fetch_key_internal().Michael Adam2008-05-081-1/+5
| | | | Michael
* registry: change order of arguments of regdb_fetch_key_internal()Michael Adam2008-05-081-4/+4
| | | | | | list talloc context first. Michael
* registry: skip writes of existing keys in init_registry_data().Michael Adam2008-04-301-0/+3
| | | | Michael
* registry: save writes in init_registry_data() if data does already exist.Michael Adam2008-04-301-12/+43
| | | | | | | This is done by first checking if all data (keys and values) exists (using new regdb_key_exists()) and kompletely skipping all writes if it does. Michael
* registry: check for existence of key init_registry_key and possibly save a ↵Michael Adam2008-04-301-0/+4
| | | | | | write. Michael
* registry: add function regdb_key_exists() to check for existence of a key.Michael Adam2008-04-301-0/+17
| | | | | | | The existence of the registry key entry (and not the values entry!) is taken as the criterion for existence. Michael
* registry: use regdb_fetch_key_internal() in regdb_fetch_values().Michael Adam2008-04-301-5/+1
| | | | Michael
* registry: use regdb_fetch_key_internal() in regdb_fetch_keys().Michael Adam2008-04-301-7/+1
| | | | Michael
* registry: add a function for fetching a tdb record for a given keystringMichael Adam2008-04-301-0/+12
| | | | | | regdb_fetch_key_internal() Michael
* registry: combine talloc_strdup() and normalize_reg_path() in ↵Michael Adam2008-04-301-7/+1
| | | | | | | | regdb_fetch_keys(). the talloc_strdup() call is just and extra allocation here. Michael
* registry: use normalize_reg_path() in regdb_fetch_keys()Michael Adam2008-04-301-2/+1
| | | | | | instead of handcrafting normalization. Michael
* registry: use dbwrap_fetch_bystring() in regdb_fetch_values().Michael Adam2008-04-301-5/+1
| | | | Michael
* registry: use dbwrap_fetch_bystring() in regdb_fetch_keys().Michael Adam2008-04-301-5/+1
| | | | | | | instead of using regdb->fetch and constructing tdb data from the registry key string by hand. Michael
* registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree.Michael Adam2008-04-131-1/+5
| | | | Michael
* registry: honour the WERROR that regsubkey_ctr_addkey gives in regdb_fetch_keys.Michael Adam2008-04-131-1/+7
| | | | Michael
* registry: rename init_registry() to registry_init_full() for consistency.Michael Adam2008-04-131-1/+1
| | | | Michael
* registry: change init_registry() to return WERROR instead of bool.Michael Adam2008-04-131-5/+2
| | | | Michael
* registry: change registry_init_smbconf() to return WERROR instead of boolMichael Adam2008-04-131-5/+2
| | | | Michael
* registry: refactor common part of registry initialization out.Michael Adam2008-04-133-25/+15
| | | | | | into a new function registry_init_common(). Michael
* registry: change registry_init_basic() to return WERROR instead of boolMichael Adam2008-04-131-5/+5
| | | | Michael
* registry: change reghook_cache_add() to return WERROR instead of boolMichael Adam2008-04-133-6/+10
| | | | Michael
* registry cachehook: change helper function keyname_to_path() to return WERROR.Michael Adam2008-04-131-18/+32
| | | | Michael
* adt_tree: change pathtree_add to return WERR instead of bool.Michael Adam2008-04-131-3/+3
| | | | Michael
* registry cachehook: revert logic to make fast path more obvious and reduce ↵Michael Adam2008-04-131-8/+9
| | | | | | indent. Michael
* registry: change reghook_cache_init() to return WERROR and use it in the ↵Michael Adam2008-04-134-9/+26
| | | | | | callers. Michael
* registry cachehook: compare cache_tree against NULL, not 0.Michael Adam2008-04-131-1/+1
| | | | Michael