1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

5068 Commits

Author SHA1 Message Date
Andrew Tridgell
c3d04fd8fc build: don't distinguish system and local libs in wscript files 2010-04-06 20:26:37 +10:00
Andrew Tridgell
42f92494ea build: LIBLDB hack not needed any more 2010-04-06 20:26:36 +10:00
Andrew Tridgell
a3421fe6e9 build: added BUILD_SUBDIR() wrapper 2010-04-06 20:26:35 +10:00
Andrew Tridgell
d0c19bb35e build: LIBLDB alias 2010-04-06 20:26:35 +10:00
Andrew Tridgell
9a1cd09a10 build: added ADD_CFLAGS() and started of Samba4 build 2010-04-06 20:26:34 +10:00
Andrew Tridgell
2b5a1cc70c build: added waf build rules for ldb 2010-04-06 20:26:34 +10:00
Andrew Tridgell
04aa584c02 build: added target directory options 2010-04-06 20:26:34 +10:00
Jelmer Vernooij
ccd954f2a7 s4-python: Avoid importing glue directly. 2010-04-04 00:30:34 +02:00
Jelmer Vernooij
31a517e172 s4-python: Move dsdb constants to a separate python module. 2010-04-04 00:14:23 +02:00
Jelmer Vernooij
5a026219a9 s4-python: Remove unused imports, duplicate definitions of SECINFO_ constants. 2010-04-03 23:47:26 +02:00
Andrew Tridgell
5ccd30e9ac talloc: change talloc minor version to 2.0.2
this has the talloc_is_parent() bugfix
2010-04-02 13:15:18 +11:00
Jelmer Vernooij
5f3fcf7a77 s4-python: Install external included packages only if they're not present on the system. 2010-03-31 03:56:24 +02:00
Matthias Dieter Wallnöfer
01f1f87aa9 s4:registry/tests/diff.c - try to make also this test compatible with big-endian platforms 2010-03-30 13:02:27 +02:00
Matthias Dieter Wallnöfer
b08bbbb42d s4:registry/tests/hive.c - make the test compatible with big-endian platforms 2010-03-30 12:54:38 +02:00
Matthias Dieter Wallnöfer
c5d1d68f0b s4:registry/util.c - remove those "talloc_free"s
They're not really necessary.
2010-03-29 21:52:12 +02:00
Matthias Dieter Wallnöfer
c38e96278a s4:registry/tests/generic.c - fix the DWORD_* types test to work also against big endian platforms 2010-03-29 21:38:23 +02:00
Matthias Dieter Wallnöfer
8d0b67b644 s4:registry/ldb.c - Break with "NULL" as an error case when the data doesn't fit in the "reg_ldb_pack_value" function 2010-03-29 21:38:18 +02:00
Matthias Dieter Wallnöfer
e25e60ba2f s4:registry/ldb.c - Always check the "name" attribute for != NULL
If it's NULL return invalid parameter as Windows does. The name is "" if it
refers to the default value.
2010-03-29 20:53:38 +02:00
Matthias Dieter Wallnöfer
90d2902c73 s4:registry - move the UTF16 length calculation for "reg_key_get_info" into the RPC server code
It does fit better there.
2010-03-29 20:36:32 +02:00
Matthias Dieter Wallnöfer
8efea42948 s4:registry/util.c - fix indentation 2010-03-29 19:55:16 +02:00
Jelmer Vernooij
a5e6b5589b registry: Fix compilation. 2010-03-29 18:44:00 +02:00
Wilco Baan Hofman
38fc9dfdc6 Revert reordering from commit 51bedf9395
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:44:00 +02:00
Wilco Baan Hofman
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
Wilco Baan Hofman
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
Wilco Baan Hofman
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
Wilco Baan Hofman
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
Wilco Baan Hofman
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
Wilco Baan Hofman
d90f1a7146 Revert of commit 5b6ad54f43 in registry.h
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-03-29 18:43:59 +02:00
Wilco Baan Hofman
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
Wilco Baan Hofman
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
Jelmer Vernooij
1ec2b2f7f3 ldap.py: Fix syntax error. 2010-03-29 18:05:29 +02:00
Jelmer Vernooij
89aa3b766b s4-python: Format to PEP8, simplify tests. 2010-03-29 18:05:29 +02:00
Andrew Tridgell
7ed349cace pytalloc: allow for using a system libtalloc-dev with pytalloc
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
2010-03-29 21:34:29 +11:00
Andrew Tridgell
fae84f98e3 libutil: moved the networking defines to util_net.h
These were causing thousands of warnings on solaris8
2010-03-26 17:36:02 +11:00
Andrew Tridgell
3b29f9c66e s4-ldb: removed unused command line options -I and -O
These are not used anywehere, so they just confuse people

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-25 15:06:40 +11:00
Andrew Tridgell
088096d1ba python: use '#!/usr/bin/env python' to cope with varying install locations
this should be much more portable
2010-03-25 14:37:19 +11:00
Andrew Bartlett
bb7854afea s4:cmdline Add --sign and --encrypt options to our common command line
This allows ldbsearch to accept --sign and --encrypt.  I'll soon work
to integrate with the --signing= option in smbclient.

Andrew Bartlett
2010-03-24 19:28:38 +11:00
Stefan Metzmacher
f57b1da428 s4:lib/messaging: pymessaging needs libndr.h
metze
2010-03-23 18:44:33 +01:00
Matthias Dieter Wallnöfer
3a2488870f s4:registry - "reg_ldb_pack_value" - provide workarounds when the server 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-23 16:46:17 +01:00
Matthias Dieter Wallnöfer
0426b5b786 s4:registry - "LDB backend" - fix indentation 2010-03-23 16:46:17 +01:00
Matthias Dieter Wallnöfer
a6f5e495b1 s4:registry - "LDB backend" - revert the length check for UTF16 strings
Let this do the "convert_string_talloc" function as it was before.
2010-03-23 00:26:01 +01:00
Matthias Dieter Wallnöfer
bca353561e s4:registry - "LDB backend" - revert the binary storage of "REG_SZ", "REG_DWORD" and "REG_QWORD"
We agreed that this hack isn't the best of the possible solutions.
2010-03-23 00:16:19 +01:00
Matthias Dieter Wallnöfer
c69afbbfd0 s4:registry - "reg_key_del/add_abs": call "talloc_free" only on valid objects 2010-03-22 22:38:45 +01:00
Matthias Dieter Wallnöfer
12f42e35bc s4:registry - "reg_import_hive_key" - change a "talloc_steal" into a "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.
2010-03-22 22:31:08 +01:00
Matthias Dieter Wallnöfer
e2466334a0 s4:registry - "patchfile" - add another "W_ERROR_HAVE_NO_MEMORY" macro call 2010-03-22 22:31:08 +01:00
Matthias Dieter Wallnöfer
8046cbe3c1 s4:registry - "local" - add also here more "W_ERROR_HAVE_NO_MEMORY" macro tests 2010-03-22 22:31:07 +01:00
Matthias Dieter Wallnöfer
e690c0776f s4:registry - "util.c" - initialise "result" in "reg_key_add_abs" 2010-03-22 22:31:06 +01:00
Matthias Dieter Wallnöfer
e78289f167 s4:registry - "samba.c" - add a "talloc_free" 2010-03-22 22:31:05 +01:00
Matthias Dieter Wallnöfer
dc17292f1a s4:registry - add more "W_ERROR_HAVE_NO_MEMORY" invocations (on talloc'ed stuff) 2010-03-22 22:31:05 +01:00
Matthias Dieter Wallnöfer
9c3e6249fd s4:registry - "util" - remove "const" from "reg_abs_path"
Here it's not really needed
2010-03-22 22:31:04 +01:00
Matthias Dieter Wallnöfer
5f850af84a s4:registry - adaptions for "add also a memory context argument for "reg_key_del_abs" 2010-03-22 22:31:03 +01:00
Matthias Dieter Wallnöfer
5b6ad54f43 s4:registry - "util" - add also a memory context argument for "reg_key_del_abs" 2010-03-22 22:31:03 +01:00
Matthias Dieter Wallnöfer
9d8592978e s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs" 2010-03-22 22:31:02 +01:00
Matthias Dieter Wallnöfer
05d8882a96 s4:registry - "util" - fix up memory allocated data 2010-03-22 22:31:02 +01:00
Matthias Dieter Wallnöfer
96bb09bcf6 s4:registry - "dir.c" - fix up dynamic memory allocation operations
- Added free operations where needed
- Use always the "mem_ctx" for temporary data
- Proof with W_ERROR_HAVE_NO_MEMORY if stuff was allocated
2010-03-22 22:31:01 +01:00
Matthias Dieter Wallnöfer
43170dafbc s4:registry - adaptions for "add memory contexts for delete value/key functions" 2010-03-22 22:31:00 +01:00
Matthias Dieter Wallnöfer
64f51380aa s4:registry - registry.h - add memory contexts for delete value/key functions 2010-03-22 22:31:00 +01:00
Matthias Dieter Wallnöfer
dd111804f6 s4:registry - "RPC backend" - use "talloc_steal" and not "talloc_reference"
No need to create additional references but we need to assign the strings to the
right context.
2010-03-22 14:00:02 +01:00
Matthias Dieter Wallnöfer
43bb87f5fa s4:registry - "patchfile" - check if strings could be allocated 2010-03-22 13:39:40 +01:00
Matthias Dieter Wallnöfer
686825e025 s4:registry - "patchfile" - initialise the data blobs 2010-03-22 13:33:04 +01:00
Matthias Dieter Wallnöfer
c5b9b25c71 s4:registry - "patchfile" - add more "talloc_free"s to save memory 2010-03-22 13:23:20 +01:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
6f7f16dc80 s4:registry - "patchfile_preg.c" - also here don't accumulate the memory usage
Free always the unused stuff.
2010-03-22 12:26:40 +01:00
Matthias Dieter Wallnöfer
93472b41de s4:registry - "patchfile_dotreg.c" - fix a memory leak
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.
2010-03-22 12:26:39 +01:00
Matthias Dieter Wallnöfer
5f24bfb7b9 s4:registry - "patchfile" - add comments
Helps to understand when we need to generate the hive diffs.
2010-03-22 12:26:29 +01:00
Andrew Bartlett
fe3e1af901 s4:dsdb Rework schema loading and add schema reloading
This commit reworks Samba4's schema loading code to detect when it
needs to reload the schema.  This is done by watching the @REPLCHANGED
special DN.

The reload happens by means of a callback, which is only set when the
schema is loaded from the ldb - not when loaded from an LDIF file or
DRS.

We also rework the global schema handling - instead of storing the
pointer to the global schema in each ldb, we store a flag indicating
that the global schema should be returned at run time.  This makes it
much easier to switch to a new global schema.

Andrew Bartlett
2010-03-22 20:24:41 +11:00
Matthias Dieter Wallnöfer
c8a9533902 s4:registry - "patchfile.c" - consider also the hives in the generated diffs
Apparently the diffs for the hives weren't generated previously.
2010-03-22 00:13:02 +01:00
Matthias Dieter Wallnöfer
056d262bb0 s4:registry - "patchfile.c" - fix a typo 2010-03-22 00:02:06 +01:00
Matthias Dieter Wallnöfer
872d2330a4 s4:regtree - fix counter variables to be "unsigned" 2010-03-21 23:41:50 +01:00
Matthias Dieter Wallnöfer
61761cbac8 s4:registry - "LDB backend" - "reg_ldb_unpack_value"
When the name isn't found it is the default value. Call it "" to be consistent.
2010-03-21 23:36:09 +01:00
Matthias Dieter Wallnöfer
7b54964a25 s4:registry - "LDB backend" - "reg_key_get_info"
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-21 23:19:32 +01:00
Matthias Dieter Wallnöfer
773faa5063 s4:registry - "LDB backend" - "ldb_get_default_value"
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-21 23:02:31 +01:00
Matthias Dieter Wallnöfer
b7f129f5c4 s4:registry - "LDB backend" - make the key argument "const" of ldb_get_default_value 2010-03-21 22:19:12 +01:00
Matthias Dieter Wallnöfer
ea621efee7 s4:registry - "LDB backend" - fix indentation 2010-03-21 22:04:28 +01:00
Matthias Dieter Wallnöfer
6c39b10f1d s4:regshell - here we don't need a newline - "ctime" itself provides one 2010-03-21 16:02:36 +01:00
Matthias Dieter Wallnöfer
d4425ecea5 s4:regshell - don't return an error code if we get a security descriptors error
s4 itself doesn't support them so print only the error code out (in s4's case
WERR_NOT_SUPPORTED).
2010-03-21 15:56:26 +01:00
Matthias Dieter Wallnöfer
ad83995de5 s4:registry - "LDB backend" - reg_key_get_info - adapt max. subkey and value 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-21 15:33:52 +01:00
Matthias Dieter Wallnöfer
cc4e5c8beb s4:registry - "LDB backend" - don't test for "0" as string termination on binary and unknown typed values 2010-03-21 14:10:17 +01:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
a55031792d s4:registry - "LDB backend" - fix up memory allocation for dynamic integers
We don't need to reserve memory for NULL termination when storing data as
integers.
2010-03-21 14:03:55 +01:00
Matthias Dieter Wallnöfer
1d49a266ab s4:registry - "LDB backend" - Fix up the storage of binary 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-21 14:03:23 +01:00
Matthias Dieter Wallnöfer
abe75a5c8c s4:registry - use a macro for reverse byte order 2010-03-16 09:41:03 +01:00
Andrew Bartlett
2de07761e0 s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.

Andrew Bartlett
2010-03-16 19:26:03 +11:00
Matthias Dieter Wallnöfer
19aa075642 s4:registry - check also for other registry value types in the generic test 2010-03-16 08:58:32 +01:00
Matthias Dieter Wallnöfer
b7c1444683 s4:registry - add a test for the "REG_DWORD_BIG_ENDIAN" datatype 2010-03-16 08:58:31 +01:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
163e559606 s4:registry - rpc - don't crash when communication partner isn't available 2010-03-15 13:44:00 +01:00
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 95d726f301. 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
Matthias Dieter Wallnöfer
e50c982679 LDB:NSS - make LDB "signed-safe" on counter variables
"i" needs to be unsigned on both places since it counts till a "count" variable
of a "struct ldb_result" object which itself is unsigned.

I see counting variables much better as "unsigned" since in most cases we don't
use negative values at all. We've only to be careful on binary searches and
downto counts regarding them.
2010-03-02 18:02:00 +01:00
Matthias Dieter Wallnöfer
c103fbc919 s4:LDB - cosmetic fix for a "for" loop 2010-03-01 16:48:03 +01:00
Stefan Metzmacher
b28afd2bcc s4:ldb_dn: fix an uninitialized variable (found by make valgrindtest)
metze
2010-02-26 23:26:35 +01:00
Stefan Metzmacher
47fafe801b s4:ldb_dn: remove dn->ext_linearized when ext_components is modified.
metze
2010-02-26 23:26:34 +01:00
Stefan Metzmacher
c7432e4950 s4:ldb_dn: reset dn->ext_comp_num in ldb_dn_explode()
metze
2010-02-26 23:26:33 +01:00
Andrew Bartlett
3c202519ec s4:ldb Fix segfault in ldbsearch store_referral callback
sctx->refs_store was not initialised, and that made talloc_realloc
grumpy once we started actually returning referrals regularly from
Samba4's partitions module (0be57c7478
by mdw).

We now just use talloc_zero() and forget about this manual
initialisation work.  Tracking down use of uninitialised variables
with valgrind was the grand idea when this started, but in practice we
just get segfaults in unusual places.

Andrew Bartlett
2010-02-25 12:56:19 +11:00
Simo Sorce
6c0cd488e5 ldb:web Fix typo 2010-02-22 18:48:36 -05:00
Matthias Dieter Wallnöfer
91bf841c2e s4:registry/regf.c - specify the context when freeing the "regf" variable
Otherwise we get a "talloc_free with references" warning.
2010-02-22 22:15:03 +01:00
Brad Hards
3eacc83b35 Spelling fixes for source4/lib/registry.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:37 +01:00
Brad Hards
7def87cb17 Typo fix.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:36 +01:00
Brad Hards
1683d090cc LDB related spelling fixes.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:36 +01:00
Kamen Mazdrashki
8078614814 s4/ldap: Refactor the fix for ldap nested searches
Current implementation synchronizes processing for
all types of LDAP request, not only LDAP_Search ones.

Synchronization for ldap replies processing is done
locally in ldb_ildap module as this concerns only
ildb_callback() function.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-02-17 18:03:31 +02:00
Andrew Tridgell
3035c7c2ad s4-ldb: fixed permissions on urgent_replication.py 2010-02-15 21:57:08 +11:00