1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
0c5214e2eb Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-29 21:01:49 +02:00
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
f794563267 s4:lib/registry/util.c - cosmetic - fix indentation, trailing whitespaces
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Oct 15 07:27:07 UTC 2010 on sn-devel-104
2010-10-15 07:27:07 +00:00
7be36a0bd9 s4:lib/registry/util.c - strtoll call - better say explicitly that data is in hex format
Template is commit deebc934ed from Wilco.
2010-10-15 08:45:15 +02:00
a8adadbe5b Fix issues addressed by Jelmer:
* Add a comment about why the reg_strhex_to_data_blob was added
 * Fix int which should've been a boolean

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:38 +02:00
deebc934ed Fix hex():00,00,00 bugs and strtol dword bugs, these values are explicitly hex.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
4356f09d7f Fix registry parsing of strings to also support the windows method.
Specifically: dword:00000000, hex:00,00,00,00, hex(0..B):00,00,00,00

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
ce2004d631 s4: fixed some printf format errors 2010-09-15 15:39:35 +10:00
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
a833be0c4e s4: use shared registry functions.
Guenther
2010-04-27 16:42:15 +02:00
c5d1d68f0b s4:registry/util.c - remove those "talloc_free"s
They're not really necessary.
2010-03-29 21:52:12 +02:00
8efea42948 s4:registry/util.c - fix indentation 2010-03-29 19:55:16 +02:00
a5e6b5589b registry: Fix compilation. 2010-03-29 18:44:00 +02:00
38fc9dfdc6 Revert reordering from commit 51bedf9395
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:44:00 +02:00
2d6791286b Revert "s4:registry - util.c - add harder checks for inputs on "reg_val_data_string""
This reverts commit eb8c8a0eca.

Conflicts:

	source4/lib/registry/util.c

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:44:00 +02:00
16427efb74 Revert "s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch"
This reverts commit 4e6c0e1f6f.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:44:00 +02:00
b1c70d49c9 Revert "s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions"
This reverts commit cc3eec1681.

Conflicts:

	source4/lib/registry/util.c

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:44:00 +02:00
cb670f366c Revert "s4:registry - adaptions for "add memory contexts for delete value/key functions""
This reverts commit 43170dafbc.

Conflicts:

	source4/lib/registry/dir.c
	source4/lib/registry/util.c

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:43:59 +02:00
f8e67f198a Revert "s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs""
This reverts commit 9d8592978e.

Conflicts:

	source4/lib/registry/util.c

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:43:59 +02:00
541e2942f8 Remove incorrect const, something that was correct in commit 9c3e6249fd
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:43:59 +02:00
3629798f72 Revert "s4:registry - "util" - remove "const" from "reg_abs_path""
This reverts commit 9c3e6249fd.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:43:59 +02:00
c69afbbfd0 s4:registry - "reg_key_del/add_abs": call "talloc_free" only on valid objects 2010-03-22 22:38:45 +01:00
e690c0776f s4:registry - "util.c" - initialise "result" in "reg_key_add_abs" 2010-03-22 22:31:06 +01:00
9c3e6249fd s4:registry - "util" - remove "const" from "reg_abs_path"
Here it's not really needed
2010-03-22 22:31:04 +01:00
5b6ad54f43 s4:registry - "util" - add also a memory context argument for "reg_key_del_abs" 2010-03-22 22:31:03 +01:00
9d8592978e s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs" 2010-03-22 22:31:02 +01:00
05d8882a96 s4:registry - "util" - fix up memory allocated data 2010-03-22 22:31:02 +01:00
43170dafbc s4:registry - adaptions for "add memory contexts for delete value/key functions" 2010-03-22 22:31:00 +01:00
885a167929 s4:registry - "util.c" - "reg_string_to_val" - consider always the return values
In some cases we didn't consider them.
2010-03-22 12:26:41 +01:00
2f79217964 s4:registry - handle type "DWORD_BIG_ENDIAN" as type "DWORD"
Further tests show that (at least per default) there aren't any differences
between them.
2010-03-21 14:03:57 +01:00
abe75a5c8c s4:registry - use a macro for reverse byte order 2010-03-16 09:41:03 +01:00
2f686d8523 s4:registry - introduce the "REG_DWORD_BIG_ENDIAN" datatype
It's like the normal REG_DWORD type but the byte order swapped
2010-03-16 08:58:31 +01:00
cc3eec1681 s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions
We don't need to provide an extra representation for all available registry types.
But if we treat all unsupported types as binary we also get our tools (regtree,
regshell, regdiff...) working with them in a basic manner.
2010-03-15 13:28:12 +01:00
4e6c0e1f6f s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch
(As in the "reg_value_types" structure)
2010-03-15 13:27:40 +01:00
00934d4c2f s4:registry - fix up the output of hexadecimal values
Use a fixed-length representation to avoid platform-specific issues.
2010-03-15 13:27:35 +01:00
80300af278 s4:registry - add support for REG_QWORD values
Basically the same as REG_DWORD but these are eight byte long.
2010-03-15 13:27:34 +01:00
eb8c8a0eca s4:registry - util.c - add harder checks for inputs on "reg_val_data_string"
("NULL" result is error on most data types).
2010-03-14 18:46:23 +01:00
10b97ed9e4 s4-registry: add all winreg types to reg_value_types table.
Guenther
2010-03-11 14:36:42 +01:00
89ab6818e1 s4:libregistry - change counters to be "unsigned"
Also the s4 registry library has to have "unsigned" counters like the Windows
one.
2010-03-06 17:48:25 +01:00
5ab6a8d077 s4-registry: fixed byte order assumptions
the registry tests were broken on big-endian systems
2010-02-07 18:41:59 +11:00
1aed373b11 s4:lib/registry/util.c - Reintroduce "FIXME"s
Jelmer suggested to put them in again.
2009-12-30 12:39:55 +01:00
51bedf9395 lib/registry/util.c - Reorder the registry datatypes of the conversion functions
This is absolutely cosmetic and makes the code easier to comprehend.
2009-11-29 14:58:41 +01:00
df1d42fc1b Revert "s4:registry/util - Don't include the trailing '\0' in the internal data format but add it on the back-conversion to a string"
This reverts commit 7d400715e9.

"convert_string_talloc_convenience" does always add the NULL termination. Didn't
know that. Thanks Jelmer for pointing out!
2009-11-29 14:51:50 +01:00
7d400715e9 s4:registry/util - Don't include the trailing '\0' in the internal data format but add it on the back-conversion to a string
As far as I know the registry library saves all data (including) strings without
the null termination. So do it also here in a similar way.
2009-11-27 21:17:59 +01:00
5a7d48f82b Fix writing corrupt REG_SZ to the registry.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
fd5174e88c lib/util Split data_blob_hex_string() into upper and lower
Rather than have a repeat of the bugs we found at the plugfest where
hexidecimal strings must be in upper or lower case in particular
places, ensure that each caller chooses which case they want.

This reverts most of the callers back to upper case, as things were
before tridge's patch.  The critical call in the extended DN code is
of course handled in lower case.

Andrew Bartlett
2009-11-12 16:34:01 +11:00
94069bd274 s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
9ffb6d2d9e Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
37d885c51a Remove iconv_convenience argument from convert_string{,talloc}() but
make them wrappers around convert_string{,talloc}_convenience().
2008-10-24 14:26:46 +02:00