summaryrefslogtreecommitdiffstats
path: root/source4/lib/registry
Commit message (Collapse)AuthorAgeFilesLines
* Remove incorrect const, something that was correct in commit ↵Wilco Baan Hofman2010-03-291-2/+2
| | | | | | 9c3e6249fd984b823a77cab0514601d2a487920a Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
* Revert "s4:registry - "util" - remove "const" from "reg_abs_path""Wilco Baan Hofman2010-03-291-3/+3
| | | | | | This reverts commit 9c3e6249fd984b823a77cab0514601d2a487920a. Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
* pytalloc: allow for using a system libtalloc-dev with pytallocAndrew Tridgell2010-03-291-1/+1
| | | | | | | | | When we have a system talloc library, we still need to grab pytalloc.h from lib/talloc. We don't want to just use -Ilib/talloc, as otherwise we'll get the in-tree talloc.h which may not be compatible with the system talloc.h So we need to give the path to pytalloc.h
* python: use '#!/usr/bin/env python' to cope with varying install locationsAndrew Tridgell2010-03-251-1/+1
| | | | this should be much more portable
* s4:registry - "reg_ldb_pack_value" - provide workarounds when the server ↵Matthias Dieter Wallnöfer2010-03-231-0/+9
| | | | | | | | | | | | | receives non-standard data. For now we reset/delete the "data" attribute. Anyway there is the need to find a better solution (we probably want to change the format and save all data as we got it like Windows itself does). These workarounds are needed since for example the Windows 2000 Registry Editor initialises empty REG_SZ strings with content '\0' and length 1 (not a valid UTF16 sequence - "convert_string_talloc" breaks). So we simply reset/delete the "data" attribute which works (no content).
* s4:registry - "LDB backend" - fix indentationMatthias Dieter Wallnöfer2010-03-231-1/+2
|
* s4:registry - "LDB backend" - revert the length check for UTF16 stringsMatthias Dieter Wallnöfer2010-03-231-10/+5
| | | | Let this do the "convert_string_talloc" function as it was before.
* s4:registry - "LDB backend" - revert the binary storage of "REG_SZ", ↵Matthias Dieter Wallnöfer2010-03-231-110/+19
| | | | | | "REG_DWORD" and "REG_QWORD" We agreed that this hack isn't the best of the possible solutions.
* s4:registry - "reg_key_del/add_abs": call "talloc_free" only on valid objectsMatthias Dieter Wallnöfer2010-03-221-6/+6
|
* s4:registry - "reg_import_hive_key" - change a "talloc_steal" into a ↵Matthias Dieter Wallnöfer2010-03-221-1/+1
| | | | | | | | "talloc_reference" Use a "talloc_reference" since the "hive" variable can continue to exist also after the destructed "struct local_key" object. It is also referenced by the "mountpoints" structure under the "ctx" object.
* s4:registry - "patchfile" - add another "W_ERROR_HAVE_NO_MEMORY" macro callMatthias Dieter Wallnöfer2010-03-221-0/+1
|
* s4:registry - "local" - add also here more "W_ERROR_HAVE_NO_MEMORY" macro testsMatthias Dieter Wallnöfer2010-03-221-8/+26
|
* s4:registry - "util.c" - initialise "result" in "reg_key_add_abs"Matthias Dieter Wallnöfer2010-03-221-0/+2
|
* s4:registry - "samba.c" - add a "talloc_free"Matthias Dieter Wallnöfer2010-03-221-0/+2
|
* s4:registry - add more "W_ERROR_HAVE_NO_MEMORY" invocations (on talloc'ed stuff)Matthias Dieter Wallnöfer2010-03-224-1/+13
|
* s4:registry - "util" - remove "const" from "reg_abs_path"Matthias Dieter Wallnöfer2010-03-221-3/+3
| | | | Here it's not really needed
* s4:registry - adaptions for "add also a memory context argument for ↵Matthias Dieter Wallnöfer2010-03-222-2/+2
| | | | "reg_key_del_abs"
* s4:registry - "util" - add also a memory context argument for "reg_key_del_abs"Matthias Dieter Wallnöfer2010-03-222-5/+4
|
* s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs"Matthias Dieter Wallnöfer2010-03-221-6/+3
|
* s4:registry - "util" - fix up memory allocated dataMatthias Dieter Wallnöfer2010-03-221-1/+10
|
* s4:registry - "dir.c" - fix up dynamic memory allocation operationsMatthias Dieter Wallnöfer2010-03-221-15/+50
| | | | | | - Added free operations where needed - Use always the "mem_ctx" for temporary data - Proof with W_ERROR_HAVE_NO_MEMORY if stuff was allocated
* s4:registry - adaptions for "add memory contexts for delete value/key functions"Matthias Dieter Wallnöfer2010-03-2213-62/+57
|
* s4:registry - registry.h - add memory contexts for delete value/key functionsMatthias Dieter Wallnöfer2010-03-221-8/+16
|
* s4:registry - "RPC backend" - use "talloc_steal" and not "talloc_reference"Matthias Dieter Wallnöfer2010-03-221-4/+4
| | | | | No need to create additional references but we need to assign the strings to the right context.
* s4:registry - "patchfile" - check if strings could be allocatedMatthias Dieter Wallnöfer2010-03-221-0/+10
|
* s4:registry - "patchfile" - initialise the data blobsMatthias Dieter Wallnöfer2010-03-221-2/+2
|
* s4:registry - "patchfile" - add more "talloc_free"s to save memoryMatthias Dieter Wallnöfer2010-03-221-5/+30
|
* s4:registry - "util.c" - "reg_string_to_val" - consider always the return valuesMatthias Dieter Wallnöfer2010-03-221-7/+9
| | | | In some cases we didn't consider them.
* s4:registry - "patchfile_preg.c" - also here don't accumulate the memory usageMatthias Dieter Wallnöfer2010-03-221-4/+26
| | | | Free always the unused stuff.
* s4:registry - "patchfile_dotreg.c" - fix a memory leakMatthias Dieter Wallnöfer2010-03-221-3/+5
| | | | | | | Here we allocate memory on the "NULL" context through "reg_val_data_string" on each call of "set_value". So when we have written out the allocated data on the specified file descriptor we should immediately free this memory! Otherwise we may end up with a big memory consumption on big registry databases.
* s4:registry - "patchfile" - add commentsMatthias Dieter Wallnöfer2010-03-221-0/+6
| | | | Helps to understand when we need to generate the hive diffs.
* s4:registry - "patchfile.c" - consider also the hives in the generated diffsMatthias Dieter Wallnöfer2010-03-221-0/+9
| | | | Apparently the diffs for the hives weren't generated previously.
* s4:registry - "patchfile.c" - fix a typoMatthias Dieter Wallnöfer2010-03-221-1/+1
|
* s4:regtree - fix counter variables to be "unsigned"Matthias Dieter Wallnöfer2010-03-211-3/+4
|
* s4:registry - "LDB backend" - "reg_ldb_unpack_value"Matthias Dieter Wallnöfer2010-03-211-1/+1
| | | | When the name isn't found it is the default value. Call it "" to be consistent.
* s4:registry - "LDB backend" - "reg_key_get_info"Matthias Dieter Wallnöfer2010-03-211-2/+29
| | | | | | | | Consider also the default value (if it exists) as value. That means: - count it when setting "num_values" - take also his buffer length as a candidate for the maximum value buffer length This is what Windows does.
* s4:registry - "LDB backend" - "ldb_get_default_value"Matthias Dieter Wallnöfer2010-03-211-1/+1
| | | | | There exist also key objects (the hives) which don't contain a "key" entry at all. This prevented to display their default value (my fault).
* s4:registry - "LDB backend" - make the key argument "const" of ↵Matthias Dieter Wallnöfer2010-03-211-1/+2
| | | | ldb_get_default_value
* s4:registry - "LDB backend" - fix indentationMatthias Dieter Wallnöfer2010-03-211-2/+2
|
* s4:regshell - here we don't need a newline - "ctime" itself provides oneMatthias Dieter Wallnöfer2010-03-211-1/+1
|
* s4:regshell - don't return an error code if we get a security descriptors errorMatthias Dieter Wallnöfer2010-03-211-2/+2
| | | | | s4 itself doesn't support them so print only the error code out (in s4's case WERR_NOT_SUPPORTED).
* s4:registry - "LDB backend" - reg_key_get_info - adapt max. subkey and value ↵Matthias Dieter Wallnöfer2010-03-211-8/+8
| | | | | | | | | | | length Those lengths are measured in UTF8 string lengths and not in UTF16 ones (the returned strings are generally in this format). Discovered this by checking the s3 registry code. Therefore we have to multiply the both numbers by two. Discovered with the "regedt32" (old NT registry editor).
* s4:registry - "LDB backend" - don't test for "0" as string termination on ↵Matthias Dieter Wallnöfer2010-03-211-2/+1
| | | | binary and unknown typed values
* s4:registry - handle type "DWORD_BIG_ENDIAN" as type "DWORD"Matthias Dieter Wallnöfer2010-03-213-16/+5
| | | | | Further tests show that (at least per default) there aren't any differences between them.
* s4:registry - "LDB backend" - fix up memory allocation for dynamic integersMatthias Dieter Wallnöfer2010-03-211-2/+2
| | | | | We don't need to reserve memory for NULL termination when storing data as integers.
* s4:registry - "LDB backend" - Fix up the storage of binary ↵Matthias Dieter Wallnöfer2010-03-211-11/+12
| | | | | | | REG_SZ/REG_EXPAND_SZ values There seem to exist also UTF16 sequences which have byte sizes of a multiple of two but are invalid (gd's winreg test shows this).
* s4:registry - use a macro for reverse byte orderMatthias Dieter Wallnöfer2010-03-162-10/+4
|
* s4:registry - check also for other registry value types in the generic testMatthias Dieter Wallnöfer2010-03-161-0/+16
|
* s4:registry - add a test for the "REG_DWORD_BIG_ENDIAN" datatypeMatthias Dieter Wallnöfer2010-03-161-0/+14
|
* s4:registry - introduce the "REG_DWORD_BIG_ENDIAN" datatypeMatthias Dieter Wallnöfer2010-03-162-4/+26
| | | | It's like the normal REG_DWORD type but the byte order swapped