summaryrefslogtreecommitdiff
path: root/source4/lib/registry/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-29s4:registry/ldb.c - Break with "NULL" as an error case when the data doesn't ↵Matthias Dieter Wallnöfer1-2/+5
fit in the "reg_ldb_pack_value" function
2010-03-29s4:registry/ldb.c - Always check the "name" attribute for != NULLMatthias Dieter Wallnöfer1-2/+22
If it's NULL return invalid parameter as Windows does. The name is "" if it refers to the default value.
2010-03-29s4:registry - move the UTF16 length calculation for "reg_key_get_info" into ↵Matthias Dieter Wallnöfer1-8/+0
the RPC server code It does fit better there.
2010-03-23s4:registry - "reg_ldb_pack_value" - provide workarounds when the server ↵Matthias Dieter Wallnöfer1-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).
2010-03-23s4:registry - "LDB backend" - fix indentationMatthias Dieter Wallnöfer1-1/+2
2010-03-23s4:registry - "LDB backend" - revert the length check for UTF16 stringsMatthias Dieter Wallnöfer1-10/+5
Let this do the "convert_string_talloc" function as it was before.
2010-03-23s4:registry - "LDB backend" - revert the binary storage of "REG_SZ", ↵Matthias Dieter Wallnöfer1-110/+19
"REG_DWORD" and "REG_QWORD" We agreed that this hack isn't the best of the possible solutions.
2010-03-22s4:registry - adaptions for "add memory contexts for delete value/key functions"Matthias Dieter Wallnöfer1-21/+8
2010-03-21s4:registry - "LDB backend" - "reg_ldb_unpack_value"Matthias Dieter Wallnöfer1-1/+1
When the name isn't found it is the default value. Call it "" to be consistent.
2010-03-21s4:registry - "LDB backend" - "reg_key_get_info"Matthias Dieter Wallnöfer1-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.
2010-03-21s4:registry - "LDB backend" - "ldb_get_default_value"Matthias Dieter Wallnöfer1-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).
2010-03-21s4:registry - "LDB backend" - make the key argument "const" of ↵Matthias Dieter Wallnöfer1-1/+2
ldb_get_default_value
2010-03-21s4:registry - "LDB backend" - fix indentationMatthias Dieter Wallnöfer1-2/+2
2010-03-21s4:registry - "LDB backend" - reg_key_get_info - adapt max. subkey and value ↵Matthias Dieter Wallnöfer1-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).
2010-03-21s4:registry - "LDB backend" - don't test for "0" as string termination on ↵Matthias Dieter Wallnöfer1-2/+1
binary and unknown typed values
2010-03-21s4:registry - handle type "DWORD_BIG_ENDIAN" as type "DWORD"Matthias Dieter Wallnöfer1-8/+2
Further tests show that (at least per default) there aren't any differences between them.
2010-03-21s4:registry - "LDB backend" - fix up memory allocation for dynamic integersMatthias Dieter Wallnöfer1-2/+2
We don't need to reserve memory for NULL termination when storing data as integers.
2010-03-21s4:registry - "LDB backend" - Fix up the storage of binary ↵Matthias Dieter Wallnöfer1-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).
2010-03-16s4:registry - use a macro for reverse byte orderMatthias Dieter Wallnöfer1-5/+2
2010-03-16s4:registry - introduce the "REG_DWORD_BIG_ENDIAN" datatypeMatthias Dieter Wallnöfer1-1/+13
It's like the normal REG_DWORD type but the byte order swapped
2010-03-15s4:registry - fix up the output of hexadecimal valuesMatthias Dieter Wallnöfer1-2/+2
Use a fixed-length representation to avoid platform-specific issues.
2010-03-15s4:registry - add support for REG_QWORD valuesMatthias Dieter Wallnöfer1-0/+65
Basically the same as REG_DWORD but these are eight byte long.
2010-03-14s4:registry - ldb.c - provide a mechanism for storing UTF8/binary REG_DWORD ↵Matthias Dieter Wallnöfer1-12/+47
values We need to support this as gd's WINREG torture test shows.
2010-03-14s4:registry - ldb.c - provide a mechansim for storing UTF8/binary ↵Matthias Dieter Wallnöfer1-7/+39
REG_SZ/REG_EXPAND_SZ values We need to support this as gd's WINREG torture test shows.
2010-03-14s4:registry - ldb.c - fix up a strange LDB filterMatthias Dieter Wallnöfer1-1/+1
2010-03-14s4:registry - ldb.c - fix up the memory handling in "reg_ldb_unpack_value"Matthias Dieter Wallnöfer1-3/+8
Don't substitute existing data blobs with new ones and make sure, that the result objects in the data blob don't have memory dependencies of the LDB value input.
2010-03-14s4:registry - ldb.c - check more for possible "Out of memory" circumstancesMatthias Dieter Wallnöfer1-4/+10
2010-03-14s4:registry - ldb.c - remove superfluous "query" variableMatthias Dieter Wallnöfer1-4/+2
2010-03-14s4:registry - ldb.c - Consider result values in "reg_ldb_pack_value"Matthias Dieter Wallnöfer1-17/+59
Break on errors and return NULL and otherwise the message pointer.
2010-03-14s4:registry - ldb.c - Move the "val" structureMatthias Dieter Wallnöfer1-3/+5
Move it into the REG_SZ/REG_EXPAND_SZ case block since it's used only there. Plus convert it from static into dynamic talloc'ed.
2010-03-10s4:registry/ldb.c - if "name" isn't set we should return WERR_INVALID_PARAMMatthias Dieter Wallnöfer1-1/+5
2010-03-10s4:lib/registry/ldb.c - fix up registry backend to be more robustMatthias Dieter Wallnöfer1-9/+5
This should let the new WINREG tests written by gd at least pass against us.
2010-03-06s4:lib/registry/ldb.c - fix trailing whitespacesMatthias Dieter Wallnöfer1-6/+6
2010-03-06s4:registry library - fix up "reg_ldb_set_value"Matthias Dieter Wallnöfer1-9/+23
The previous logic was wrong since it tried to add empty data in some cases which always ended in an error. This problem should be fixed with the new logic.
2010-03-06s4:registry library - make "reg_ldb_pack/unpack_value" more robustMatthias Dieter Wallnöfer1-28/+35
This to prevent segmentation faults, wrong server inputs ecc.
2010-03-06s4:libregistry - change counters to be "unsigned"Matthias Dieter Wallnöfer1-6/+7
Also the s4 registry library has to have "unsigned" counters like the Windows one.
2010-02-22Spelling fixes for source4/lib/registry.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-07s4-registry: fixed byte order assumptionsAndrew Tridgell1-1/+2
the registry tests were broken on big-endian systems
2009-10-23s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()Andrew Tridgell1-1/+1
This allows us to reuse a ldb context if it is open twice, instead of going through the expensive process of a full ldb open. We can reuse it if all of the parameters are the same. The change relies on callers using talloc_unlink() or free of a parent to close a ldb context.
2009-03-01s4: Use same function signature for convert_* as s3.Jelmer Vernooij1-4/+4
2009-03-01Add allow_badcharcnv argument to all conversion function, forJelmer Vernooij1-2/+2
consistency with Samba 3.
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-1/+1
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-10-24Remove more uses of global_loadparm.Jelmer Vernooij1-8/+4
2008-10-24Remove iconv_convenience argument from convert_string{,talloc}() butJelmer Vernooij1-2/+2
make them wrappers around convert_string{,talloc}_convenience().
2008-10-21Fix double free.Jelmer Vernooij1-1/+0
2008-10-21Fix the build.Jelmer Vernooij1-2/+2
2008-10-21Revert "Registry server LDB backend: Don't make copies of the same type"Jelmer Vernooij1-2/+2
The original data pointer may go away so we do want to make copies in this case. This reverts commit 625359b2e266105022309df8985720108ecd6f67.
2008-10-21Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrvJelmer Vernooij1-9/+10
Conflicts: source4/lib/registry/ldb.c source4/rpc_server/winreg/rpc_winreg.c
2008-10-21Registry server LDB backend: Don't make copies of the same typeMatthias Dieter Wallnöfer1-2/+2
2008-10-21Registry server LDB backend REG_BINARY type: Save it directly in LDBMatthias Dieter Wallnöfer1-3/+5
With this patch the REG_BINARY type is saved directly in a LDB registry database rather than converted in a hex-string.