1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

650 Commits

Author SHA1 Message Date
Michael Adam
13ceeeedbc s3:registry: streamline and cleanup regdb_set_secdesc() somewhat.
Michael
2009-02-26 13:22:55 +01:00
Michael Adam
2fb944bde1 s3:registry: refactor deletion of value/secdesc/subkey list tdb records out
of regdb_store_values().

Michael
2009-02-26 13:22:55 +01:00
Michael Adam
741e902888 s3:registry: streamline reg_deletekey() somewhat.
use W_ERROR_... macros and separate assignments from checks

Michael
2009-02-26 13:22:55 +01:00
Michael Adam
4b444e4ac4 s3:registry: use create_reg_subkey() in reg_createkey().
Instead of calling store_reg_keys()

On my box, importing 2000 shares into an empty smbconf key
now takes some 32 seconds.

Michael
2009-02-26 13:22:55 +01:00
Michael Adam
d73dafb5fe s3:registry: implement create_subkey for the smbconf backend
by delegating to the db backend

Michael
2009-02-26 13:22:54 +01:00
Michael Adam
20e40d3b7d s3:registry: implement create_subkey for the db backend.
Michael
2009-02-26 13:22:54 +01:00
Michael Adam
602bfeb360 s3:registry: add a create_subkey method to the backend ops.
This is to provide a more atomic means of adding a subkey of a key.

Michael
2009-02-26 13:22:54 +01:00
Michael Adam
0b22f8b99c s3:registry: hash the list of subkeys in the regsubkey_ctr
This removes many loops over all the arrays
(from regsubkey_ctr_key_exists) and thus
reduces "net conf drop" from 1m55 to 48seconds
and "net conf import" from 1m55 to 58 seconds
for 2000 shares on my box.

Michael
2009-02-26 13:22:54 +01:00
Michael Adam
149d94dd8f s3:registry: remove definition of regsubkey_ctr from the surface.
All access is now through accessor functions in reg_objects.c
This allows for performance tuning under the hood in the next step.

Michael
2009-02-26 13:22:53 +01:00
Michael Adam
1ce0035abb s3:registry: use regsubkey_ctr_init() in reg_eventlog.c
Michael
2009-02-26 13:22:53 +01:00
Michael Adam
69be6f5c1d s3:registry: use regsubkey_ctr_get_seqnum() in reg_backend_db.c
Michael
2009-02-26 13:22:53 +01:00
Michael Adam
8a74b535c8 s3:registry: use regsubkey_ctr_set_seqnum() in reg_backend_db.c
Michael
2009-02-26 13:22:53 +01:00
Michael Adam
3c15d053f5 s3:registry: use regsubkey_ctr_init() in reg_backend_db.c
instead of using talloc directly.

Michael
2009-02-26 13:22:53 +01:00
Michael Adam
ea2b74090d s3:registry: use regsubkey_ctr_init() in reg_api.c
instead of using talloc on struct regsubkey_ctr.

Michael
2009-02-26 13:22:52 +01:00
Michael Adam
cd8bfd3a84 s3:registry: add regsubkey_ctr_get_seqnum() to hide implementation
Michael
2009-02-26 13:22:52 +01:00
Michael Adam
63ed47c9e4 s3:registry: add regsubkey_ctr_set_seqnum to hide implementation from caller.
Michael
2009-02-26 13:22:52 +01:00
Michael Adam
763f41f39c s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr
Michael
2009-02-26 13:22:51 +01:00
Michael Adam
060abd7e38 s3:registry: fix a comment
Michael
2009-02-26 13:22:51 +01:00
Michael Adam
63b576424d s3:registry: don't directly access key->subkeys->subkeys[] in reg_backend_db.c
Use the reg_objects accessor regsubkey_ctr_specific_key() instead.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
8c1e4034fe s3:registry: don't directly access key->subkeys->subkeys[] in reg_api.c
Use the reg_objects accessor regsubkey_ctr_specific_key() instead.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
62b53507d2 s3:registry: don't directly access key->subkeys->num_subkeys in reg_backend_db.
Use the reg_objects api instead.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
e05b7a8627 s3:registry: don't directly access key->subkeys->num_subkeys in reg_api.c
Use the reg_objects api instead.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
58fc61217d s3:registry: replace typedef "REGSUBKEY_CTR" by "struct regsubkey_ctr"
This paves the way for hiding the typedef and the implementation from the
surface.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
b56f449d6b Revert "Fix a O(n^2) algorithm in regdb_fetch_keys()"
This reverts commit a13f065bad.

This fix is reverted, because the speedup is going to move
further down into reg_objects.c. The unsorted list of subkey names
is going to be indexed: This O(n^2) search bites us in more places.
This re-establishes the abstraction of reg_objects.c.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
9f97674ef7 s3:registry: wrap deletekey_recursive in one big transaction.
This speeds up "net conf drop" with 2000 shares on my box from
4m40s to 1m50s, leaving virtually only cpu load.

Michael
2009-02-26 11:05:23 +01:00
Michael Adam
ba0e944c46 s3:registry: provide transaction_start|commit|cancel fns for the registry tdb
Michael
2009-02-26 11:05:22 +01:00
Volker Lendecke
170830c008 Wrap creating the sorted subkey cache in a transaction
Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:22 +01:00
Volker Lendecke
5c91cdcc47 Add a comment describing the sorted subkeys
Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:22 +01:00
Volker Lendecke
1b1aac412c Add sorted subkey cache
On my box this gets net conf list for 1000 records down to .1 seconds

Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:22 +01:00
Jeremy Allison
0b62cdbed0 Quieten down a boatload of shadowed variable warnings on Solaris.
Makes real problems easier to spot.
Jeremy.
2009-02-23 15:03:29 -08:00
Jeremy Allison
2ca48d3740 Fix printf type warning.
Jeremy.
2009-02-19 13:11:36 -08:00
Volker Lendecke
a13f065bad Fix a O(n^2) algorithm in regdb_fetch_keys() 2009-02-19 20:06:29 +01:00
Volker Lendecke
d0ee90ace9 Fix a buffer handling bug when adding lots of registry keys
This is *ancient*... From 2002, and nobody noticed until someone added lots of
shares using net conf... :-)
2009-02-19 14:26:50 +01:00
Volker Lendecke
b222de4eb3 Remove a pointless NULL check 2009-02-14 22:01:03 +01:00
Volker Lendecke
4e34c0ceca Fix some nonempty blank lines 2009-02-14 22:01:03 +01:00
Michael Adam
57a290e942 s3:registry: always provision the registry, not only in smbd.
This will make tools like "net registry" also fill the registry
with the basic hives and keys.

Michael
2009-01-28 12:06:26 +01:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Jeremy Allison
8344e94574 Unify se_access_check with the S4 code. Will make
calculation of SEC_FLAG_MAXIMUM_ALLOWED much easier
for files.
Jeremy.
2008-10-31 10:51:45 -07:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Jeremy Allison
e5692d4cbe Remove SEC_ACCESS. It's a uint32_t.
Jeremy.
2008-10-09 09:49:03 -07:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Michael Adam
6e16022d62 registry: use _bystring wrappers to dbwrap_trans_(store|delete).
Michael
(This used to be commit 103ce6c9e9)
2008-08-05 23:40:26 +02:00
Michael Adam
a8ae5228f5 registry: bump debug level to 1 in regdb_init() if storing version string fails.
Higher level callers should take care of level 0 messages.

Michael
(This used to be commit b5829e04ea)
2008-07-15 14:25:00 +02:00
Michael Adam
0586d981a7 registry: bump debug level to 1 in regdb_init() if opening the registry fails.
Higher level callers take care of level 0 messages or more drastic measures.

Michael
(This used to be commit 111d802b5c)
2008-07-15 14:22:55 +02:00
Michael Adam
f587e0310c registry: fix logic in deleting subkeys record in regdb_fetch_keys().
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
(This used to be commit 75be2116ac)
2008-07-09 10:43:25 +02:00
Michael Adam
ad2e1757e7 registry: improve logic for deleting value records in regdb_store_keys().
Don't ignore all errors from dbwrap_delete_bystring() but
only NT_STATUS_NOT_FOUND.

Michael
(This used to be commit d7ec9b2d52)
2008-07-09 10:43:25 +02:00
Michael Adam
70d8e57c17 registry: fetch regdb_fetch_keys() when a key exists but not its subkey-record.
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
(This used to be commit f329aaf045)
2008-07-08 17:10:01 +02:00
Michael Adam
f7d39653f5 registry: add removal of secdesc of a key to regdb_store_keys().
Michael
(This used to be commit a01d8fe5e8)
2008-05-08 18:29:10 +02:00
Michael Adam
1f279f866f registry: add comments to removing lists in regdb_store_keys().
Michael
(This used to be commit 3e89217e7e)
2008-05-08 18:29:10 +02:00
Michael Adam
9f7653bfa1 registry: change order of deleting value and subkey lists in store_keys().
Next step in the plan to make store_keys safer without transactions.

Michael
(This used to be commit f7c8718dea)
2008-05-08 18:29:10 +02:00
Michael Adam
453141b395 registry: adapt comment to first step in regdb_store_keys().
Michael
(This used to be commit 97592db08a)
2008-05-08 18:29:10 +02:00
Michael Adam
8c2b976208 registry: adapt comment of last step in regdb_store_keys().
adding number (3) ....

Michael
(This used to be commit a03a17365d)
2008-05-08 18:29:10 +02:00
Michael Adam
315c7b7824 registry: regdb_store_keys: move storing the subkey list down after removing values.
Michael
(This used to be commit 986030cdda)
2008-05-08 18:29:10 +02:00
Michael Adam
01e640f6ea registry: add comment explaining workflow to make store_keys safe w/o 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
(This used to be commit 55dd9bdd14)
2008-05-08 18:29:10 +02:00
Michael Adam
7fa4cd2421 registry: check for existence of non base key in regdb_store_keys() before proceeding.
Michael
(This used to be commit 52413c94fc)
2008-05-08 18:29:09 +02:00
Michael Adam
8e21d223f7 registry: add a function regdb_key_is_base_key() to check whether is composite.
This partly duplicates code from regdb_key_exists(). Maybe refactor later.

Michael
(This used to be commit c27d03bba8)
2008-05-08 18:29:09 +02:00
Michael Adam
4095b008ee registry: check for existence of key in regdb_set_secdesc() before proceeding.
Michael
(This used to be commit 347bab7f4a)
2008-05-08 18:29:09 +02:00
Michael Adam
7d35d4e2a4 registry: check for existence of key in regdb_get_secdesc() before proceeding.
Michael
(This used to be commit 727e5a87c0)
2008-05-08 18:29:09 +02:00
Michael Adam
ba94ab2ed8 registry: check for existence of key in regdb_store_values() before proceeding.
Michael
(This used to be commit 8a2c9d965d)
2008-05-08 18:29:09 +02:00
Michael Adam
4394c2dafb registry: check for existence of key in regdb_fetch_keys() before proceeding.
Michael
(This used to be commit cf653e101d)
2008-05-08 18:29:09 +02:00
Michael Adam
00ce73850d registry: check for existence of key in regdb_fetch_values() first.
This uses the new semantics for existence of a key.

Michael
(This used to be commit 56a58690d3)
2008-05-08 18:29:09 +02:00
Michael Adam
284bab74a7 registry: free talloc context on error path in regdb_fetch_values().
Michael
(This used to be commit 978aef3a86)
2008-05-08 18:29:09 +02:00
Michael Adam
a26880c372 registry: Implement new semantics for existence of registry key in tdb.
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
(This used to be commit 477008367f)
2008-05-08 18:29:09 +02:00
Michael Adam
f5cbbb5c02 registry: make normalize_reg_path() strip leading and trailing '/' chars.
Michael
(This used to be commit 04762cfcdb)
2008-05-08 18:29:08 +02:00
Michael Adam
120aacfac5 registry: free temporary data in regdb_fetch_key_internal().
Michael
(This used to be commit 2b25f480ba)
2008-05-08 18:29:08 +02:00
Michael Adam
79a009b876 registry: change order of arguments of regdb_fetch_key_internal()
list talloc context first.

Michael
(This used to be commit 23d7002b22)
2008-05-08 18:29:08 +02:00
Michael Adam
f50002b491 registry: skip writes of existing keys in init_registry_data().
Michael
(This used to be commit 37dabf9317)
2008-04-30 12:42:33 +02:00
Michael Adam
9fe870affa registry: save writes in init_registry_data() if data does already exist.
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
(This used to be commit 7c5f1583cb)
2008-04-30 12:42:32 +02:00
Michael Adam
ed6a9edb1e registry: check for existence of key init_registry_key and possibly save a write.
Michael
(This used to be commit 3ab5a2f1b3)
2008-04-30 12:42:32 +02:00
Michael Adam
6ec4c8631a registry: add function regdb_key_exists() to check for existence of a key.
The existence of the registry key entry (and not the values entry!) is
taken as the criterion for existence.

Michael
(This used to be commit 207a0ece45)
2008-04-30 12:42:32 +02:00
Michael Adam
167d54cc67 registry: use regdb_fetch_key_internal() in regdb_fetch_values().
Michael
(This used to be commit 3316541ac9)
2008-04-30 12:42:32 +02:00
Michael Adam
6b4ed4b8f3 registry: use regdb_fetch_key_internal() in regdb_fetch_keys().
Michael
(This used to be commit 78f924ca05)
2008-04-30 12:42:32 +02:00
Michael Adam
5379dda0cd registry: add a function for fetching a tdb record for a given keystring
regdb_fetch_key_internal()

Michael
(This used to be commit 97bed9a236)
2008-04-30 12:42:32 +02:00
Michael Adam
411ae73283 registry: combine talloc_strdup() and normalize_reg_path() in regdb_fetch_keys().
the talloc_strdup() call is just and extra allocation here.

Michael
(This used to be commit 217233349b)
2008-04-30 12:42:32 +02:00
Michael Adam
dba75c0831 registry: use normalize_reg_path() in regdb_fetch_keys()
instead of handcrafting normalization.

Michael
(This used to be commit 1e4d2310d0)
2008-04-30 12:42:31 +02:00
Michael Adam
caba2d3a64 registry: use dbwrap_fetch_bystring() in regdb_fetch_values().
Michael
(This used to be commit 569f9844e9)
2008-04-30 12:42:31 +02:00
Michael Adam
9d933dedf9 registry: use dbwrap_fetch_bystring() in regdb_fetch_keys().
instead of using regdb->fetch and constructing tdb data
from the registry key string by hand.

Michael
(This used to be commit 87a58140f0)
2008-04-30 12:42:31 +02:00
Michael Adam
282c9ff8ae registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree.
Michael
(This used to be commit c2d9baa29e)
2008-04-13 15:45:33 +02:00
Michael Adam
86d189dad1 registry: honour the WERROR that regsubkey_ctr_addkey gives in regdb_fetch_keys.
Michael
(This used to be commit 7dd7471da7)
2008-04-13 15:41:07 +02:00
Michael Adam
a9ff941f41 registry: rename init_registry() to registry_init_full() for consistency.
Michael
(This used to be commit 14d82708d4)
2008-04-13 15:33:48 +02:00
Michael Adam
281e610ff3 registry: change init_registry() to return WERROR instead of bool.
Michael
(This used to be commit 0b196095db)
2008-04-13 15:33:48 +02:00
Michael Adam
6c66d5d019 registry: change registry_init_smbconf() to return WERROR instead of bool
Michael
(This used to be commit 7c343c6057)
2008-04-13 15:33:48 +02:00
Michael Adam
4ae2e8c7ba registry: refactor common part of registry initialization out.
into a new function registry_init_common().

Michael
(This used to be commit 5da52b95ac)
2008-04-13 15:33:48 +02:00
Michael Adam
3f01e05a77 registry: change registry_init_basic() to return WERROR instead of bool
Michael
(This used to be commit 6a31e659cb)
2008-04-13 15:33:48 +02:00
Michael Adam
80b6d7b1d6 registry: change reghook_cache_add() to return WERROR instead of bool
Michael
(This used to be commit e65a999989)
2008-04-13 15:33:48 +02:00
Michael Adam
5166d562ea registry cachehook: change helper function keyname_to_path() to return WERROR.
Michael
(This used to be commit 78bb005ee4)
2008-04-13 15:33:47 +02:00
Michael Adam
01f4bd4f4d adt_tree: change pathtree_add to return WERR instead of bool.
Michael
(This used to be commit da45fb92f6)
2008-04-13 15:33:47 +02:00
Michael Adam
84c5da2ff4 registry cachehook: revert logic to make fast path more obvious and reduce indent.
Michael
(This used to be commit e97d558c56)
2008-04-13 15:33:47 +02:00
Michael Adam
4b4306eb4a registry: change reghook_cache_init() to return WERROR and use it in the callers.
Michael
(This used to be commit 2f4ca62dce)
2008-04-13 15:33:47 +02:00
Michael Adam
2ffe46e24d registry cachehook: compare cache_tree against NULL, not 0.
Michael
(This used to be commit 4bfc0be55f)
2008-04-13 15:33:47 +02:00
Michael Adam
26a5652f6d registry: change init_registry_key() and init_registry_data() to return WERR
Michael
(This used to be commit e0718f04a7)
2008-04-13 15:33:47 +02:00
Michael Adam
cb624c4057 registry: unify debug output in the registry init functions.
Michael
(This used to be commit 4fd9b45ffc)
2008-04-13 15:33:47 +02:00
Michael Adam
6b85938f27 registry: change regdb_init() to return WERROR instead of bool.
Michael
(This used to be commit c312852abc)
2008-04-13 15:33:47 +02:00
Michael Adam
bcb19766d6 registry: make registry_init_smbconf() hook the registry ops onto given key.
This still defaults to HKLM\Software\Samba\smbconf, but is interchangeable now.
This allows us to open the libsmbconf registry backend on different registry keys.

Michael
(This used to be commit 8fe1a2f567)
2008-04-13 15:33:47 +02:00
Michael Adam
b5a75ec402 registry cachehook: add talloc failed debug messages.
Michael
(This used to be commit 9841ee7fd4)
2008-04-13 01:47:16 +02:00
Michael Adam
a721f0a729 registry cachehook: eliminate a couple trailing spaces (empty lines).
Michael
(This used to be commit c9f01aee37)
2008-04-13 01:44:57 +02:00
Michael Adam
0fa8845fa0 registry cachehook: fix memleak (to talloc_tos()): free key at the end.
Michael
(This used to be commit 3f5955d361)
2008-04-13 01:43:43 +02:00
Michael Adam
227904434a registry cachehook: refactor normalization of keyname out.
Michael
(This used to be commit acb9c98dff)
2008-04-13 01:43:42 +02:00
Michael Adam
bbca983507 registry: adapt copied function header comments.
Michael
(This used to be commit 2e762be0db)
2008-04-13 01:43:42 +02:00
Michael Adam
413c2e9b0a registry: remove the REGISTRY_HOOKS layer from the reghook cache.
There is no need to save the keyname again, we only need to
get the REGISTRY_OPS out of the pathtree.

Furthermore, this makes life easier, since we can now pass
in keynames as temporarily allocated strings.

Michael
(This used to be commit 2f9ee2f782)
2008-04-13 01:43:42 +02:00
Michael Adam
c890aef164 registry: move normalize_dbkey() from lib/util_reg.c to registry/reg_util.c
This function is only used inside registry code.

Michael
(This used to be commit 48745e3fbd)
2008-04-12 02:41:20 +02:00
Michael Adam
2830626877 registry: remove parameter checks from smbconf backend: they are in libsmbconf.
Michael
(This used to be commit 118cf38133)
2008-04-03 15:43:04 +02:00
Volker Lendecke
16198dc51e Convert dbwrap_trans_delete to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit dead193f46)
2008-04-01 14:04:22 +02:00
Volker Lendecke
fcdfff1cc8 Convert dbwrap_trans_store to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 5f4de856af)
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
b8dcade819 regdb: let regdb_fetch_keys() handle NULL and failure cases in the same way and return -1
metze
(This used to be commit 983fd58805)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
b55942a763 regdb: get the seqnum before the record, to not miss something
metze
(This used to be commit c214107bd9)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
2b21b02c6a regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This is the fixed version of commit 5c28c74aa0.

metze
(This used to be commit 924acd7f69)
2008-04-01 14:04:20 +02:00
Michael Adam
0bf8ba9f26 registry: reg_deletevalue should return error, when the value does not exist.
Michael
(This used to be commit 04b48984bb)
2008-03-31 17:22:02 +02:00
Michael Adam
ce0bbc82fd Revert "regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This reverts commit 4e2be189e9.

Metze, this broke the registry (reg_api layer), but I don't yet know
exactly how and why. By the way, the locks there had the purpose of
fetching the seqnum that really matches the data.

This needs some more thought / debugging. But I wanted to have
the tree in a working state again.

Michael
(This used to be commit 5c28c74aa0)
2008-03-30 03:05:34 +02:00
Michael Adam
f8fdc36fdb regdb: use == 0 (instead of != -1) as indicator for success of dbwrap_trans_[delete|store]()
Michael
(This used to be commit 7dcd0c1e53)
2008-03-27 18:14:57 +01:00
Michael Adam
c86d10ae83 regdb: use != 0 instead of == -1 check for transaction_[commit|cancel]
Michael
(This used to be commit b6ceeaabae)
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
5439f5f710 regdb: use db_open_trans()
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit a77b5b91dd)
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
618f22409a regdb: use regdb->transaction_start(regdb) != 0 consistent
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 093c3bced9)
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
2a95f3f874 regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 4e2be189e9)
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
d9de61341c regdb: use dbwrap_trans_store_int32
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 9620696083)
2008-03-27 18:14:56 +01:00
Volker Lendecke
fac2d8546b Fix Coverity ID 471
(This used to be commit d3b6df67fe)
2008-03-23 18:28:24 +01:00
Volker Lendecke
2e2f1d57b1 Fix Coverity ID 477
(This used to be commit f17b1b0fc6)
2008-03-23 18:28:24 +01:00
Volker Lendecke
988cffe9ca Fix Coverity ID 478
(This used to be commit 5f77938dc4)
2008-03-23 18:28:23 +01:00
Michael Adam
178c430821 registry: add reg_init_basic() - init registry with only the db backend.
Michael
(This used to be commit 1831042bdc)
2008-03-22 02:05:53 +01:00
Michael Adam
4825cef8bc registry: close registry in exit path in registry_init_smbconf().
Michael
(This used to be commit 5aa3141bff)
2008-03-22 01:54:18 +01:00
Michael Adam
b8a949b566 registry: some whitespace cleanup in init_registry().
Michael
(This used to be commit f33095e44b)
2008-03-22 01:53:44 +01:00
Michael Adam
88d46f4ea4 registry: remove unneeded talloc stackframe variable.
Michael
(This used to be commit 81993db828)
2008-03-22 01:52:03 +01:00
Michael Adam
e12ed5279a registry: close regdb in error path (and use it) in init_registry().
Michael
(This used to be commit 73b325fe7a)
2008-03-22 01:49:21 +01:00
Michael Adam
9ec7af58c6 registry: fix registry_init_smbconf() to close the registry at the end.
Michael
(This used to be commit f4d87fdbf2)
2008-03-21 23:50:49 +01:00
Volker Lendecke
1e696c2845 Fix Coverity ID 506
(This used to be commit c9add4d59a)
2008-03-21 11:48:09 +01:00
Michael Adam
060f554adc registry: use available string constant in debug statement.
Michael
(This used to be commit 6bac03a2ec)
2008-03-20 15:01:52 +01:00
Michael Adam
cef4e1bd9e registry: in regdb_init, not only complain about INFO/version, store it...
Michael
(This used to be commit 27d67365ad)
2008-03-20 15:01:52 +01:00
Michael Adam
4bac0e505f registry: reformat regdb_init() slightly, breaking long lines.
Michael
(This used to be commit 11da885f1e)
2008-03-20 15:01:52 +01:00
Michael Adam
13b894b01e registry: untangle assignment and if-statement in regdb_init().
Michael
(This used to be commit 504058df97)
2008-03-20 15:01:52 +01:00
Michael Adam
2f01e055cf registry: separate initialization of registry data from regdb_init().
Leave this to the users (currently registry_init_smbconf() and
init_registry()) to initialize as much of preliminary registry data
as needed.

Michael
(This used to be commit 59fdd30c78)
2008-03-20 15:01:52 +01:00
Michael Adam
8880111466 registry: add a transaction wrapper to init_registry_key_internal().
Michael
(This used to be commit 8b9cff84d5)
2008-03-20 15:01:52 +01:00
Michael Adam
1f3139df25 registry: refactor creation of subkeys out of init_registry_data().
Michael
(This used to be commit 55233f875e)
2008-03-20 15:01:51 +01:00
Günther Deschner
e8bd75ec73 Bind Group Policy processing closer to the samba registry.
Guenther
(This used to be commit e9c56250eb)
2008-03-18 21:31:24 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d2259)
2008-03-17 20:52:25 +01:00
Michael Adam
6a2a76bc92 registry: untangle assignment and if-clause in init_registry_data().
Michael
(This used to be commit 64664d25cf)
2008-03-17 13:12:47 +01:00
Michael Adam
cc2e3f180b registry: convert regdb REGISTRY_OPS to named struct initializers.
Michael
(This used to be commit 3ea0a0beb4)
2008-03-17 08:22:33 +01:00
Michael Adam
9741e07140 registry: use talloc instead of malloc and provide common exit point
in regdb_get_secdesc().

Michael
(This used to be commit df848d8eee)
2008-03-17 08:22:33 +01:00
Michael Adam
647432a40c registry: remove an unused variable from regdb_set_secdesc().
Michael
(This used to be commit 76dad05e4c)
2008-03-17 08:22:33 +01:00
Michael Adam
18a407de8c registry: untangle assignments and if statements in regdb_set_secdesc().
Michael
(This used to be commit d553b5d725)
2008-03-17 08:22:33 +01:00
Michael Adam
40e6ec16ee registry: use talloc_stackframe instead of hand crafted temporary context.
Michael
(This used to be commit e4f2c856ec)
2008-03-17 08:22:33 +01:00
Michael Adam
2ce3d4b918 registry: use talloc instead of malloc for tdb data in regdb_store_values().
Michael
(This used to be commit 860316cbe7)
2008-03-17 08:22:33 +01:00
Michael Adam
ae7f7e44ff registry: don't use talloc_stackframe() instead of talloc_tos() als temp ctx
in regdb_store_values(). Also provide common exit path for
freeing memory.

Michael
(This used to be commit 7454e426f2)
2008-03-17 08:22:33 +01:00
Michael Adam
ecd7479be2 registry: don't leak to talloc stack in regdb_fetch_keys().
Michael
(This used to be commit 3a1d79116b)
2008-03-17 08:22:33 +01:00
Michael Adam
3b250d17d9 registry: explicitly use talloc context instead of talloc_tos()
in regdb_fetch_keys().

Michael
(This used to be commit 93ea27a3e2)
2008-03-17 08:22:33 +01:00
Michael Adam
46ea0d333e registry: don't leak on success path in regdb_store_keys().
Michael
(This used to be commit 331d7fd2ea)
2008-03-17 08:22:33 +01:00
Michael Adam
a0d4c1e127 registry: allocate tempory data in talloc stack in regdb_store_keys().
Michael
(This used to be commit a99b51159a)
2008-03-17 08:22:33 +01:00
Michael Adam
78adf71669 registry: separate cancel and failur exit paths in regdb_store_keys().
Michael
(This used to be commit e1d4a2fa5b)
2008-03-17 08:22:33 +01:00
Michael Adam
e64825e620 registry: don't leak memory on transaction fail in regdb_store_keys().
Michael
(This used to be commit 9315de4048)
2008-03-17 08:22:33 +01:00
Michael Adam
ba8607acc1 registry: don't leak (to talloc_tos()) in regdb_store_keys().
use talloc_stackframe() and free on error path.

Michael
(This used to be commit 95525772f2)
2008-03-17 08:22:33 +01:00
Michael Adam
a37811727a registry: reformat regdb_store_keys_internal(), killing long lines.
Michael
(This used to be commit 966b2414cb)
2008-03-17 08:22:32 +01:00
Michael Adam
a446378e7a registry: don't leak (to talloc_tos()) in regdb_store_keys_internal().
Michael
(This used to be commit 76e4cdc25f)
2008-03-17 08:22:32 +01:00
Michael Adam
8432f7f8cf registry: reformat init_registry_data() some, killing long lines.
Michael
(This used to be commit f357b1ddd3)
2008-03-17 08:22:32 +01:00
Michael Adam
0a98b3ce1d registry: explicitly use talloc context instead of talloc_tos()
in init_registry_data().

Michael
(This used to be commit 8b0dd1e758)
2008-03-17 08:22:32 +01:00
Michael Adam
0ca465f054 registry: don't leak (to talloc_tos()) in init_registry_data().
Michael
(This used to be commit 7fd0ae3edc)
2008-03-17 08:22:32 +01:00
Michael Adam
7c6de9b0bd registry: rename tdb_refcount to regdb_refcount after change to dbwrap.
Michael
(This used to be commit d39957e2c9)
2008-03-17 08:22:32 +01:00
Michael Adam
62556cd6f0 registry: rename tdb_reg to regdb after change to dbwrap.
Michael
(This used to be commit 79f37d4765)
2008-03-17 08:22:32 +01:00
Michael Adam
178f3afe41 registry: migrate tdb registry backend to dbwrap.
Michael
(This used to be commit 3c42d8ee16)
2008-03-17 08:22:32 +01:00
Günther Deschner
2b4378d0c5 Fix return of reg values below HKLM/SOFTWARE/MICROSOFT/WINDOWSNT/CURRENTVERSION.
Michael, please check.

Guenther
(This used to be commit 29ccc0e233)
2008-03-11 10:52:32 +01:00
Günther Deschner
87222d3f11 Fix init_registry_data for subkeyless top-level keys.
On a fresh install with no existing registry.tdb, make sure we are able to
create our initial top-level entries.

Michael, Volker, please check.

Guenther
(This used to be commit 956bc60206)
2008-03-01 01:02:15 +01:00
Tim Potter
34eef81d2a Fix double free bugs after calling regfio_close()
(This used to be commit 737bb950d5)
2008-02-20 18:28:41 -08:00
Michael Adam
9e9cd40a7d Make regdb_init() behave like regdb_open() when registry is already opened.
I.e. increment the refcounter.

Michael
(This used to be commit 951d3fae2c)
2008-02-19 09:09:04 +01:00
Michael Adam
bb0bf5c902 Remove (now) unused function make_default_reg_sd().
Michael
(This used to be commit 2c66413de2)
2008-02-18 17:41:21 +01:00
Michael Adam
7ba906634b Grab secdesc for key from registry for reg_savekey()
instead of construction another default secdesc.

Michael
(This used to be commit 194e00822c)
2008-02-18 17:41:21 +01:00
Michael Adam
f3694d50a3 Add NT Authority\System as group sid to default registry key security descriptor.
Michael
(This used to be commit 9f0448ca32)
2008-02-18 17:41:20 +01:00
Michael Adam
59e7ee6d7d Change construct_registry_sd() to return WERROR instead of the SEC_DESC *.
Michael
(This used to be commit 91dbe79df2)
2008-02-18 17:41:20 +01:00
Michael Adam
e16f039f26 Reformat construct_registry_sd() slightly (stick to coding rules).
Michael
(This used to be commit d87fb13959)
2008-02-18 17:41:20 +01:00
Michael Adam
d38e756feb Use BUILTIN\administrators as owner of the default registry key security descriptor.
Michael
(This used to be commit 52e9815765)
2008-02-18 17:41:20 +01:00
Michael Adam
abdedc7940 Reformat copied reg_savekey/reg_restorekey code.
Sticking to coding rules.

Michael
(This used to be commit 2c54ef2d07)
2008-02-15 17:32:32 +01:00
Michael Adam
355faf2e3d Move the implementation of _winreg_RestoreKey to reg_api.c
This removes the internals of reg_api from srv_winreg_nt.c entirely,
only reg_api is used there, now. This enlarges the dependencies of
reg_api somewhat now since it adds regfio. But this can be separated
out later. The current goal is to achieve a complete use of reg_api.

Michael
(This used to be commit 2222acbac9)
2008-02-15 16:23:10 +01:00
Michael Adam
c720a0e228 Move implementation of _winreg_SaveKey() from srv_winreg_nt.c to reg_api.c
This gives a new function reg_savekey() and hides a piece of
the backend code from srv_winreg_nt.c. One step towards using
reg_api throughout samba code.

Michael
(This used to be commit bf6340d00d)
2008-02-15 16:23:10 +01:00
Michael Adam
8fffca2e95 Adapt a comment to current circumstances.
Michael
(This used to be commit 84ec89ab9f)
2008-02-15 16:23:10 +01:00
Michael Adam
9af84dd382 Rename registry_init_regdb() to registry_init_smbconf().
That's what it actually is.

Michael
(This used to be commit 9d3c27f557)
2008-02-15 16:23:10 +01:00
Volker Lendecke
6d387037b1 Fix Coverity IDs 451, 452
(This used to be commit d28a537277)
2008-01-25 20:55:51 +01:00
Michael Adam
99dfd66488 Rename lib/util_reg_smbconf.c to registry/reg_init_smbconf.c
This actually is a counterpart to reg_init_full, in that is does
open and initialize the registry too, but only registeres the backends
necessary to access the SMBCONF key.

Michael
(This used to be commit 01bda3ab35)
2008-01-21 08:49:12 +01:00
Michael Adam
1b4dfc2e7d Move reg_frontend_hilvl.c to reg_dispatcher.c
This is actually the dispatcher to the registered registry backends.

Michael
(This used to be commit 39d65d11f8)
2008-01-21 08:49:12 +01:00
Michael Adam
42641d6321 Extend/fix comments.
Michael
(This used to be commit 4952417fca)
2008-01-21 08:49:12 +01:00
Michael Adam
99186bf726 Extract regkey_open_internal() from reg_frontend.c to new reg_util_legacy.c
reg_openpath should be used instead of this function (along with the
reg_api interface). Last callers of this function are in services_db.c

Michael
(This used to be commit 0005b88d74)
2008-01-21 08:49:12 +01:00
Michael Adam
b5666ceefb Rename reg_db.c to reg_backend_db.c
Michael
(This used to be commit c3f695d3b1)
2008-01-21 08:49:12 +01:00
Michael Adam
e7520f3ad8 Rename reg_shares.c to reg_backend_shares.c
Michael
(This used to be commit aaf33ae5b8)
2008-01-21 08:49:12 +01:00
Michael Adam
4ccee0dc0c Rename reg_smbconf.c to reg_backend_smbconf.c
Michael
(This used to be commit b85e5ee450)
2008-01-21 08:49:12 +01:00
Michael Adam
1e68e24c8e Rename reg_printing.c to reg_backend_printing.c
Start making naming of source files more systematic
to facilitate understanding of the structures.

Michael
(This used to be commit b3c2fb17a4)
2008-01-21 08:49:12 +01:00
Volker Lendecke
33f3eeaa00 Fix some "set but never used" warnings
(This used to be commit 4a6dadc517)
2008-01-20 17:44:40 +01:00
Michael Adam
6c5a831e96 Add a debug message to fetch_reg_values().
Michael
(This used to be commit 239aa59cc1)
2008-01-20 03:54:56 +01:00
Michael Adam
7745674f0c Add some debugging output to reg_cachehook.c
Michael
(This used to be commit 2a27892880)
2008-01-20 03:54:56 +01:00
Michael Adam
e45dacce89 Remove the dynamic registry overlay.
It is unnecessary now the dynamic functions have been made
registry backends of their own.

Michael
(This used to be commit e327953bd6)
2008-01-20 03:47:37 +01:00
Michael Adam
c16b74cc86 Add a registry backend perflib that replaces the former dynamic overlay.
Michael
(This used to be commit c3fba41595)
2008-01-20 03:47:37 +01:00
Michael Adam
c4b65647ca Some reformatting of current_version_fetch_values().
Michael
(This used to be commit d2e3814db8)
2008-01-20 03:47:37 +01:00
Michael Adam
2925d83573 Add a registry backend current_version that replaces the former dynamic overlay.
Make sure to only respond to the exact current version key since subkeys
are registered by other backends (printing and - soon - perflib).

Michael
(This used to be commit 2c650bf63c)
2008-01-20 03:47:36 +01:00
Michael Adam
25c21fb562 Use some consts instead of literal strings for registry keys.
Michael
(This used to be commit 80024f4e1c)
2008-01-20 02:03:41 +01:00
Michael Adam
8eed06fb8c Some reformatting in hkpt_params_fetch_values().
Michael
(This used to be commit f245c4e094)
2008-01-20 02:03:40 +01:00
Michael Adam
949a88ee2f Add a registry backend hkpt_params that replaces the former dynamic overlay.
Michael
(This used to be commit 8e8bb6ba12)
2008-01-20 02:03:40 +01:00
Michael Adam
b4e3c75272 Some reformatting in tcpip_params_fetch_values().
Michael
(This used to be commit 5b3813b233)
2008-01-20 02:03:40 +01:00
Michael Adam
c5a5b404b4 Add a registry backend tcpip_params that replaces the former dynamic overlay.
Michael
(This used to be commit a8a743b693)
2008-01-20 02:03:40 +01:00
Michael Adam
f383b853f5 Some reformatting in prod_options_fetch_values().
Michael
(This used to be commit 347b988654)
2008-01-20 02:03:39 +01:00
Michael Adam
663815ec2b Add a registry backend prod_options that replaces the former dynamic overlay.
Michael
(This used to be commit d9b89e9d30)
2008-01-20 02:03:39 +01:00
Michael Adam
d48c5f1599 Some reformatting in netlogon_params_fetch_values().
Michael
(This used to be commit 24f13fb72e)
2008-01-20 02:03:39 +01:00
Michael Adam
2e47997e6e Rename netlogon_params_fetch_reg_values() to netlogon_params_fetch_values().
Michael
(This used to be commit 54e7c80985)
2008-01-20 02:03:39 +01:00
Michael Adam
c8a0b2a3a2 In reg_backend_netlogon_params, delegate fetch_subkeys() to regdb.
In order to be able to open the netlogon_params key (the new backend replacing
the former dynamic overlay), certain methods need to be provided. Delegate these
to the regdb backend (like e.g. the smbconf backend does).

Michael
(This used to be commit 9261b2c4bf)
2008-01-20 02:03:38 +01:00
Michael Adam
1b2dd2dcc8 Fix registering Registry backends in reghook_cache_add().
This was broken in 331c0d6216
(pstring removal).

Michael
(This used to be commit 7d1e986f3a)
2008-01-20 02:03:38 +01:00
Michael Adam
563c4ef740 Use constant KEY_NETLOGON_PARAMS instead of literal key.
Michael
(This used to be commit daf37c9545)
2008-01-20 02:03:38 +01:00
Michael Adam
139340f570 Volker is right: why keep commented out migrated dynamic reg overlays around?...
Michael
(This used to be commit a73b8d16aa)
2008-01-20 02:03:38 +01:00
Michael Adam
cb1e0de56f Use c99 struct initializers for REGISTRY_OPS in reg_shares.c
Michael
(This used to be commit 2c4dfd7aaa)
2008-01-20 02:03:38 +01:00
Michael Adam
15015b7490 Use c99 struct initializers for REGISTRY_OPS in reg_printing.c
Michael
(This used to be commit a89bee4139)
2008-01-20 02:03:37 +01:00
Michael Adam
29af710d6a Use c99 struct initializers for REGISTRY_OPS in reg_smbconf.c.
Michael
(This used to be commit 96d116b003)
2008-01-20 02:03:37 +01:00
Michael Adam
27d9ac3219 Use C99 structure initializers for netlogon_params_reg_ops.
Michael
(This used to be commit f3901f179b)
2008-01-18 12:07:04 +01:00
Michael Adam
60fbc7e4f0 Add a registry backend netlogon_params that replaces the former dynamic overlay.
This is the first step in replacing the dynamic overlays by proper
backends implementing REGISTRY_OPS.

Michael
(This used to be commit e8a0524961)
2008-01-18 09:40:57 +01:00
Michael Adam
1ea809383e Fix typo in debug message.
Michael
(This used to be commit d7a8d7ffbd)
2008-01-18 09:40:57 +01:00
Michael Adam
32a8e74078 Add a reg_getversion() function to reg_api and use it in srv_winreg_nt.c.
Michael
(This used to be commit 903223b160)
2008-01-17 16:25:11 +01:00
Michael Adam
7f8e4bc68e Add my (C) to reg_api.c - Michael
(This used to be commit 81d6a1fbed)
2008-01-17 16:25:11 +01:00
Michael Adam
138f7ec451 Add a comment header comparing winreg.idl and reg_api.c.
Michael
(This used to be commit 15163926a8)
2008-01-17 16:25:11 +01:00
Michael Adam
da4ecfc0fa Add reg_api functions reg_getkeysecurity() and reg_setkeysecurity().
These are wrappers around the lower level functions regkey_get_secdesc()
and regkey_set_secdesc(). Next step towards hiding reg_frontend from
the surface.

Michael
(This used to be commit 7251a24b48)
2008-01-17 16:25:11 +01:00
Michael Adam
fcb47f5ea9 Comment out unused reg_create_path() and reg_delete_path().
These functions are unused. Comment them out for now.

Michael
(This used to be commit 0cb8399d7c)
2008-01-17 16:25:11 +01:00
Michael Adam
99b195a6aa Move reg_create_path() and reg_delete_path() to reg_api.c
Michael
(This used to be commit 4d82cc586c)
2008-01-17 16:25:11 +01:00
Michael Adam
b6eaf05479 Add some sectioning comments to reg_api.c
Michael
(This used to be commit d3c9c27374)
2008-01-17 16:25:11 +01:00
Michael Adam
1a15320dcd Make utility function reg_deletekey_recursive_internal() static.
Michael
(This used to be commit 3e66127322)
2008-01-17 16:25:11 +01:00
Michael Adam
8c2d440c1f Use the proper boolean constants in reg_frontend_hilvl.c
Michael
(This used to be commit 5c0a1d5d45)
2008-01-17 16:25:11 +01:00
Michael Adam
6e1d36f8c6 Reformatting: Strip trailing white spaces from reg_frontent_hilvl.c.
Michael
(This used to be commit 36085d9004)
2008-01-17 16:25:11 +01:00
Michael Adam
982c71fcd2 Use the proper boolean functions.
Michael
(This used to be commit beaa83f32b)
2008-01-15 14:56:00 +01:00
Michael Adam
8a01076334 Remove some trailing spaces.
Michael
(This used to be commit 1941c365b5)
2008-01-15 14:55:04 +01:00
Michael Adam
d35bda0ffd Add detection for need of update to the registry db.
This only detects if the tdb sequence number has changed
since the data has last been read.

Michael
(This used to be commit 3f081ebead)
2008-01-14 19:38:01 +01:00
Michael Adam
2f195e52fa Fix a DEBUG statement.
Michael
(This used to be commit 18360b852c)
2008-01-04 21:35:29 +01:00
Michael Adam
1c183874ab Use the proper boolean constants.
Michael
(This used to be commit 2ba625e473)
2008-01-04 15:26:05 +01:00
Günther Deschner
5c09517d7d Fix crash bug in regdb_close() when called with no ref count.
Michael, please check.

Guenther
(This used to be commit d6575ff5d2)
2008-01-04 12:58:09 +01:00
Michael Adam
0240d175bf Return existsing cache_tree if it has already been initialized.
So reghook_cache_init() does not leak memory when called more
than once.
Also, fix the return value while we are at it.

Michael
(This used to be commit 25f571f40a)
2008-01-03 12:07:02 +01:00
Michael Adam
feb4d82724 Fix a permissions error in reg_deletekey_recursive().
Michael
(This used to be commit 4a56d3d707)
2007-12-31 03:25:54 +01:00
Volker Lendecke
7cbdb48475 Remove tiny code duplication
ndr_size_security_descriptor does the same as sec_desc_size
(This used to be commit bc3bd7a8e7)
2007-12-29 23:13:26 +01:00
Volker Lendecke
c663c0055a Cut down memory usage of registry initialization
(This used to be commit 264d5dfe9f)
2007-12-16 14:02:46 +01:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Günther Deschner
b05ffb5065 Fix _reg_perfcount_get_instance_info()
Guenther
(This used to be commit 20c1ba23f2)
2007-11-30 02:16:46 +01:00
Jeremy Allison
0bc4ff7b28 Remove pstring from srv_spoolss_nt.c. All gone from rpc_server/*.c
Jeremy.
(This used to be commit b5a2a1e3f8)
2007-11-27 19:05:08 -08:00
Günther Deschner
9d42af0d24 Unless talloc has some new magic there is a ctx missing here.
Guenther
(This used to be commit 172f7ce96d)
2007-11-27 18:01:56 +01:00
Jeremy Allison
80c2446321 Remove pstrings from nsswitch/ and registry/
Jeremy.
(This used to be commit 331c0d6216)
2007-11-26 17:24:56 -08:00
Jeremy Allison
d40e47db4b Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
(This used to be commit 2a0173743d)
2007-11-08 17:25:45 -08:00
Günther Deschner
99d9993fdb When deleting a key from the registry make sure the non-default
security descriptor gets deleted as well.

Guenther
(This used to be commit d140d68537)
2007-11-06 00:50:47 +01:00
Gerald (Jerry) Carter
88ee61625a Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875)
2007-11-01 15:53:44 -04:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Alexander Bokovoy
d76717fe15 Correctly free memory in regfio paths
(This used to be commit 97f9a90b82)
2007-10-15 17:41:09 -05:00
Volker Lendecke
58a0a60bd1 Remove bogus comment
(This used to be commit 142b80bf15)
2007-10-11 15:36:32 +02:00
Volker Lendecke
0ebab65706 r25534: Apply some const
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
(This used to be commit 0141e64ad4)
2007-10-10 12:31:12 -05:00
Volker Lendecke
3cc2fb5e33 r25528: Only do transactions on registry.tdb if anything changes
I got annoyed by the fsync calls clobbering my harddrive when smbd started up
for debugging.

... things you do on a plane without internet
(This used to be commit e0927a7cbf)
2007-10-10 12:31:12 -05:00
Günther Deschner
6334c7cc5f r25417: Use DBGC_REGISTRY class.
Guenther
(This used to be commit 43ca04918a)
2007-10-10 12:31:04 -05:00
Günther Deschner
4d7a1c3bcf r25370: Allow to delete registry keys recursively without deleting the final key.
Guenther
(This used to be commit e9922cd8ae)
2007-10-10 12:31:01 -05:00
Günther Deschner
3d4af73f50 r25362: Add "NT Authority\System" with Full Access to the default registry security
descriptor.

Guenther
(This used to be commit ddc6d05111)
2007-10-10 12:31:00 -05:00
Michael Adam
5b00e7c389 r25162: Refactor further: add mapping functions between
REGISTRY_VALUE and struct registry_value formats for
registry values. Lacking better naming, I called them
regval_hilvl_to_lolvl and regval_lolvl_to_hilvl for a
start. The might be useful elsewhere, so might be put
into another place later on.

Michael
(This used to be commit 883fd79061)
2007-10-10 12:30:47 -05:00
Michael Adam
f157c9abb7 r25160: Refactor out and slightly clean up canonicalization of the registry value
from smbconf_store_values().

Michael
(This used to be commit 7761f9b3cc)
2007-10-10 12:30:46 -05:00
Michael Adam
34991bbd0c r25140: Less red bars to hurt my eyes...
(This used to be commit f935d21200)
2007-10-10 12:30:44 -05:00
Michael Adam
aaa0afaa26 r25139: Avoid code duplication: let regval_ctr_copyvalue() call regval_ctr_addvalue().
This also corrects regval_ctr_copyvalue() in that it cannot create (invalid)
regval containers with dupliacte entries...

Michael
(This used to be commit 2daaaaa835)
2007-10-10 12:30:44 -05:00
Michael Adam
c5d8fd3772 r25002: Refactor out code duplication created by the previous
unification of r24998.

Michael
(This used to be commit 6026d13253)
2007-10-10 12:30:32 -05:00