1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

5081 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
1e5010d353 s4:registry - local testsuite - add a test for REG_QWORD
Change also here to fixed-length HEX values output to test for the right
representation.
2010-03-15 13:27:35 +01:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
bb1ac0c75c s4:registry - ldb.c - provide a mechanism for storing UTF8/binary REG_DWORD values
We need to support this as gd's WINREG torture test shows.
2010-03-14 18:46:22 +01:00
Matthias Dieter Wallnöfer
fbce5ded30 s4:registry - ldb.c - provide a mechansim for storing UTF8/binary REG_SZ/REG_EXPAND_SZ values
We need to support this as gd's WINREG torture test shows.
2010-03-14 18:46:22 +01:00
Matthias Dieter Wallnöfer
95bfd17e08 s4:registry - ldb.c - fix up a strange LDB filter 2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
f72790daaa s4:registry - ldb.c - fix up the memory handling in "reg_ldb_unpack_value"
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-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
33eb1c95e5 s4:registry - ldb.c - check more for possible "Out of memory" circumstances 2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
9b3c45754e s4:registry - ldb.c - remove superfluous "query" variable 2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
cd3c870333 s4:registry - ldb.c - Consider result values in "reg_ldb_pack_value"
Break on errors and return NULL and otherwise the message pointer.
2010-03-14 18:46:20 +01:00
Matthias Dieter Wallnöfer
3c6792bc76 s4:registry - ldb.c - Move the "val" structure
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-14 18:46:20 +01:00
Stefan Metzmacher
b6623e3a26 s4:lib/registry/rpc: convert to use dcerpc_binding_handle stubs
metze
2010-03-12 15:25:50 +01:00
Stefan Metzmacher
d4f143258b s4:dcom: add a comment about unused code.
metze
2010-03-12 15:25:49 +01:00
Günther Deschner
e0d85f87b7 winreg: add winreg_KeyType enum.
Guenther
2010-03-11 20:23:47 +01:00
Günther Deschner
10b97ed9e4 s4-registry: add all winreg types to reg_value_types table.
Guenther
2010-03-11 14:36:42 +01:00
Andrew Bartlett
79b4a3b22e s4:lib/socket Don't go via a string when resolving addresses in connect_multi
This also removes the special case for IP addresses, and leaves that
to the code in the resolver library.

Andrew Bartlett
2010-03-11 11:27:47 +11:00
Andrew Bartlett
0201b2fa9f s4:lib/socket Add function to set a port on the socket address 2010-03-11 11:27:47 +11:00
Matthias Dieter Wallnöfer
490c0cefeb s4:registry/ldb.c - if "name" isn't set we should return WERR_INVALID_PARAM 2010-03-10 18:50:00 +01:00
Matthias Dieter Wallnöfer
bb507d1d49 s4:lib/registry/ldb.c - fix up registry backend to be more robust
This should let the new WINREG tests written by gd at least pass against us.
2010-03-10 09:26:09 +01:00
Simo Sorce
f7f67e9e1f Fix typo and convert spaces to tabs 2010-03-09 16:42:05 -05:00
Simo Sorce
c05d13d3c2 s4:ldb fix escape parsing
sscanf can return also on short reads, in this case an invalid escape
sequence like '\1k' would be accepted, returning 1 as value and swallowing the
'k'. Use an auxiliar function to validate and convert hex escapes.
2010-03-09 15:23:49 -05:00
Nadezhda Ivanova
4b8961bc6f Fixed a bug in acl tests - python error when we create user/group/ou with a descriptor. 2010-03-09 13:53:41 +02:00
Nadezhda Ivanova
f742623b7b Added a check for permissions to modify the RDN attribute on rename.
Necessary because rdn module will be moved lower than acl in the stack.
2010-03-09 13:07:18 +02:00
Matthias Dieter Wallnöfer
8d3b7d418e LDB:asq module - change counters to "unsigned" where appropriate 2010-03-08 18:53:24 +01:00
Matthias Dieter Wallnöfer
df17e1b962 LDB:sort module - change counters to "unsigned" where appropriate 2010-03-08 18:51:27 +01:00
Matthias Dieter Wallnöfer
8248069c91 LDB:rdn name module - change counters to "unsigned" where appropriate 2010-03-08 18:51:26 +01:00
Matthias Dieter Wallnöfer
681c88798a LDB:paged searches module - change counters to "unsigned" where appropriate 2010-03-08 18:51:25 +01:00
Matthias Dieter Wallnöfer
7e7d9a8a48 LDB:paged results module - change counters to "unsigned" where appropriate 2010-03-08 18:51:25 +01:00
Matthias Dieter Wallnöfer
4e16a285c7 LDB:common - Change counters to "unsigned" where appropriate
To count LDB objects use variables of type "unsigned (int)" or "long long int"
on binary or downto searches.

To count characters in strings use "size_t".

To calculate differences between pointers use "ptrdiff_t".
2010-03-08 12:52:24 +01:00
Matthias Dieter Wallnöfer
30ff229a3e s4:LDB TDB index code - reintroduce accidentally removed code part
This was removed by 95d726f3018ef5d249f89d56bde24b7ee0c24ecf. Sorry.
2010-03-08 11:45:39 +01:00
Matthias Dieter Wallnöfer
f8dba773a5 s4:ldb_ldap.c - fix indentation 2010-03-08 10:33:24 +01:00
Matthias Dieter Wallnöfer
2d03011858 LDB:TDB backend - change counter variables to "unsigned" where appropriate 2010-03-08 10:32:56 +01:00
Matthias Dieter Wallnöfer
4a2b78a6f3 LDB:SQLITE3 backend - change counter variables to "unsigned" where appropriate 2010-03-08 10:29:26 +01:00
Matthias Dieter Wallnöfer
95d726f301 LDB:LDAP backend - change a counter variable to "unsigned" 2010-03-08 10:29:25 +01:00
Matthias Dieter Wallnöfer
b33a340e0a LDB:map - make LDB "signed-safe" on counter variables where appropriate 2010-03-08 10:29:25 +01:00
Matthias Dieter Wallnöfer
7a7cb5e9c2 s4:ldif_handlers - Change "unsigned int" to "uint32_t" which fits better here 2010-03-08 10:29:25 +01:00
Matthias Dieter Wallnöfer
6870313db5 s4:lib/registry/ldb.c - fix trailing whitespaces 2010-03-06 19:59:10 +01:00
Matthias Dieter Wallnöfer
ed678a2234 s4:registry library - fix up "reg_ldb_set_value"
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-06 19:59:04 +01:00
Matthias Dieter Wallnöfer
f5b86cdac5 s4:registry library - make "reg_ldb_pack/unpack_value" more robust
This to prevent segmentation faults, wrong server inputs ecc.
2010-03-06 19:58:57 +01:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
e10fa46f3e LDB:tools - change counters to be unsigned
In most cases we do count LDB objects which are enumerated within the "unsigned"
type. Therefore no need to use "signed" counters.
2010-03-06 11:35:17 +01:00
Andrew Tridgell
5573d04941 s4-messaging: use auto-close on the socket 2010-03-05 11:54:36 +11:00
Matthias Dieter Wallnöfer
3d94b28441 s4:ldap.py - give the "primaryGroupToken" test a better name
It tests also some other constructed attributes in a basic way.
2010-03-04 18:16:24 +01:00
Matthias Dieter Wallnöfer
4546b6b7df s4:ldap.py - add test for "tokenGroups" 2010-03-04 18:16:24 +01:00
Nadezhda Ivanova
8cb416a0b5 Refactored ACL python tests
Made each type into a separate class to be easily run individually,
removed code duplication
2010-03-04 15:22:30 +02:00
Matthias Dieter Wallnöfer
8a8c2de29f s4:ldif_handlers - Use "unsigned int" for counting purposes
I changed "uint32_t" to "unsigned int" since the LDB specification prescrives
"unsigned (int)" for counter variables (number of attributes,
number of values...).
2010-03-04 10:38:31 +01:00
Kamen Mazdrashki
5338e42182 s4/ildap: fine tune ildb_callback()
Actually ildb_context pointer is not supposed to be
valid after calling ildb_request_done().
This is due to the fact that when calling ildb_request_done()
caller will (most probably) free any locally built
ldap_request objects - thus rendering ildb_context invalid.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-03-03 13:18:38 +11:00