1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

4993 Commits

Author SHA1 Message Date
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
Andrew Tridgell
1ca2bd78b9 s4-test: minor fixes to urgent_replication.py
- fix usage name
- remove unnecessary python functions
- remote unused gc ldb
2010-02-15 21:57:08 +11:00
Fernando J V da Silva
f5de126b85 s4-drs: Test situations for Urgent Replication
Checks if the partition's uSNUrgent is updated or not, depending
on the class of the object which is created, modified or deleted.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-15 21:57:08 +11:00
Andrew Tridgell
282cc79454 s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb code 2010-02-14 18:44:20 +11:00
Matthias Dieter Wallnöfer
3598409951 s4:popt_common.c - fix intendation 2010-02-13 19:19:02 +01:00
Andrew Tridgell
3ae75a4248 s4: use LDB_TYPESAFE_QSORT() instead of ldb_qsort() 2010-02-13 22:36:12 +11:00
Andrew Tridgell
46dfa9dfbd s4-ldb: added LDB_TYPESAFE_QSORT()
Like TYPESAFE_QSORT() but for the ldb_qsort() function
2010-02-13 22:36:12 +11:00
Andrew Tridgell
828b5cd451 s4-socket: use TYPESAFE_QSORT() in netif code 2010-02-13 22:36:12 +11:00
Matthias Dieter Wallnöfer
14c4c2c735 ldb_match - Ignore ":dn" part of extended matches for now
It's not fully clear what this ":dn" part means for us. What we know is that
older AD implementations (Windows Server 2000, 2003) need it to have extended
matches working in the expected way.

To be able to interoperate with s3's winbind and other tools I and gd decided
to transform this into a warning until we know what to do.

This should fix bug #6511.
2010-02-11 15:51:56 +01:00
Andrew Tridgell
9ba0d105cc s4-pyldb: null terminate string ldb message elements from python
We need to eventually get rid of ldb_msg_find_attr_as_string() (or add
a mem_ctx to it), but meanwhile we have too many places that break if
we don't add a nul to the end of ldb msg strings from python.
2010-02-12 01:08:11 +11:00
Andrew Tridgell
32809bd8c1 util: rewrite dlinklist.h so that DLIST_ADD_END() is O(1)
This changes the meaning of the ->prev pointer in our doubly linked
lists to point at the end of the list from the front of the list. That
allows us to implement DLIST_ADD_END() and related functions in O(1)
time, which can be a huge saving in many places in Samba.

This also means that the 'type' argument to various DLIST_*() macros
is no longer needed, but I have left it in for now to keep the
patchset small, which will make it easier to revert if any problems
are found. In the future we should remove the 'type' arguments.

(jra. Move the one use of DLIST_TAIL over to the new macros).
2010-02-10 15:53:58 -08:00
Andrew Tridgell
a5d2fb752c s4-ldb: update ldb_tdb to use new DLIST_ macros
(cherry picked from commit 6ede911654566a7e21ded70dacac68df3b6a1bca)
2010-02-10 15:36:20 -08:00
Jeremy Allison
32575ed70f Temporary changes to dlinklist to keep the implementation static whilst
uses of (list)->prev are moved over to DLIST_PREV. This will be replaced
when the final (new) version of the dlinklist.h header is added.

Jeremy.
2010-02-10 15:30:59 -08:00
Matthias Dieter Wallnöfer
e34637b2a6 s4:Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Andrew Tridgell
5ab6a8d077 s4-registry: fixed byte order assumptions
the registry tests were broken on big-endian systems
2010-02-07 18:41:59 +11:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Kamen Mazdrashki
93142e4a3a s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:31 +01:00
Kamen Mazdrashki
83068b42ae s4/ldif: Better control on ldif_write_NDR() errors processing
Current implementation mask NDR_ errors implicitly.
Thus the caller has no opportunity handle such an error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:31 +01:00
Simo Sorce
08a20006c8 s4:ldb quiet down rootdse control registration 2010-01-31 13:25:17 -05:00
Simo Sorce
772d808ac8 s4:ldb Fix check made conditional by mistake 2010-01-30 02:57:33 -05:00
Simo Sorce
df7be036d7 s4:ldb add support for permissive modify control 2010-01-30 01:04:12 -05:00
Kamen Mazdrashki
a4d0ed5a10 s4/ldap: Fix nested searches SEGFAULT bug
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-29 14:09:53 +01:00
Andrew Tridgell
2fdff7f596 s4-ldbtest: fixed python import 2010-01-28 18:45:04 +11:00
Eduardo Lima
882feb39a2 s4-drs: implementation of some delete test cases
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-28 18:45:03 +11:00
Jelmer Vernooij
f679def4f2 s4: Fix a few warnings. 2010-01-21 16:15:11 +13:00
Matthieu Patou
0cdc39e730 Add a comment to tdb_wrap to explain why it should be used instead of directly using tdb 2010-01-21 07:11:18 +13:00
Wilco Baan Hofman
8067bf629c Fix unintentional free of the last value when adding a new value to a key.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-01-20 09:59:18 +13:00
Jelmer Vernooij
aa1fce645a ldap: Fix test failure that seemed to go unreported previously. 2010-01-17 12:35:26 +13:00
Jelmer Vernooij
a18889fd77 ldap.py: Remove unused imports. 2010-01-17 12:26:53 +13:00
Jelmer Vernooij
28577aae92 Import testtools as well, required for subunit. 2010-01-16 19:53:49 +13:00
Andrew Tridgell
a56ede9027 s4-ldb: cope with bad ptr alignment in ldb_index.c
We can't assume that a rec_ptr will come back from a tdb traverse with
alignment sufficient for a pointer.
2010-01-16 09:34:27 +11:00
Stefan Metzmacher
7d41afece7 s4:ldb/tests: do a "schemaUpdateNow" after creating a new attribute in ldap_schema.py
It seems that windows doesn't need that.

And we should think about a check for reloading the schema
at the start of each "write" operation.

metze
2010-01-13 16:03:52 +01:00
Stefan Metzmacher
ca9bc96b96 s4:ldb_msg: first try to decode integers as signed and then fallback to unsigned
LDAP only knowns about signed integers, so let
ldb_msg_find_attr_as_uint() and ldb_msg_find_attr_as_uint64() cope
with it.

metze
2010-01-13 14:52:00 +01:00
Stefan Metzmacher
8d4b913ce2 s4:ldb: be more strict in parsing ldb time strings
metze
2010-01-13 14:51:59 +01:00
Andrew Tridgell
a3e089db19 s4-ldb: display security descriptors with correct SDL for known SIDs
This makes it much easier to compare SDs
2010-01-10 13:23:38 +11:00
Andrew Tridgell
651ddb720a s4-messaging: remove only usage of debug_ctx() 2010-01-09 10:15:13 +11:00
Andrew Tridgell
6a36799d30 s4-messaging: fixed a memory leak in messaging_path()
It is a bit convoluted to fix, as cluster_id_string() may return a
const string.
2010-01-09 10:15:12 +11:00
Andrew Tridgell
39a4e2a38d s4-ldb: validate the type of the ldb argument to ldb_dn_new()
It has been a common bug to get the first two arguments the wrong way
around
2010-01-09 10:15:12 +11:00
Andrew Tridgell
66f161dee1 s4-acl: fixed acl.py test to use correct ldif
same problem as sec_descriptor.py
2010-01-08 13:03:07 +11:00
Andrew Tridgell
81c0b01585 s4-secdesc: fixed the sec_descriptor.py test
The test was using a "changetype: add" to try and add a member to a
group, where it should use a "changetype: modify" with a "add: member"

Also fixed the recovery when the test fails part way through (delete
the test users at the start as well as the end)

Nadya, please check!
2010-01-08 13:03:07 +11:00
Andrew Tridgell
fdf12a607d s4-ldb: improve error handling in indexing code
When we get an indexing failure we want a clear error message
2010-01-08 13:03:03 +11:00
Andrew Tridgell
dcbba583d9 s4-event: added s4_event_context_set_default()
we're still not weaned off event_context_find()
2010-01-08 13:03:02 +11:00
Andrew Tridgell
805ab0ef15 s4-messaging: added a new msg type MSG_DREPL_ALLOCATE_RID
This will be used to ask the drepl task for a new RID pool

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:01 +11:00
Andrew Tridgell
bd6d0e9379 s4-ldb: added nice ldif display of 64 bit ranges for RIDs 2010-01-08 13:02:58 +11:00
Matthias Dieter Wallnöfer
bbf9885013 s4:ldap_schema.py - add an additional check for validity of "defaultObjectCategory" 2010-01-05 20:55:45 +01:00
Matthias Dieter Wallnöfer
d8ca002a8c s4:ldap_schema.py - Move generated attributes check
Make more clear that they're created before the "schemaUpdateNow".
2010-01-05 20:55:32 +01:00
Jeremy Allison
2a66db8f93 Fix the merged build. Probably not strictly correct but allows us to "make test".
Jeremy.
2010-01-04 13:27:48 -08:00
Jelmer Vernooij
a214ebc3d6 ldb: Fix the standalone ldb build. 2010-01-02 02:40:30 +01:00
Andrew Tridgell
00b39c70f5 s4-dsdb: switched to using RMD_FLAGS instead of DELETED in extended DNs
This allows for more flags in the future
2010-01-02 08:16:57 +11:00
Andrew Tridgell
335af02218 s4-ldb: fixed valgrind error: ares can be freed by callback 2010-01-02 08:16:56 +11:00
Andrew Tridgell
1c5a268f34 s4-ldaptest: need to use MessageElement for modify messages
Without MessageElement() the flags are not set, which is invalid
2010-01-02 08:16:56 +11:00
Andrew Tridgell
e410a91ff4 s4-ldb: show an error string, as well as error message
This makes it easier to track down error mismatches from the test
suite
2010-01-02 08:16:56 +11:00
Andrew Tridgell
98d94cca6f s4-ldbtest: fixed message element in modify
a flags value of zero is not valid
2010-01-02 08:16:55 +11:00
Andrew Tridgell
81e8a18181 s4-ldb: allow modules to override error return values
The samldb module overrides the error code for some returns when
handling primaryGroupID. We need to take the error from the async
callback to allow this to work reliably
2010-01-02 08:16:55 +11:00
Andrew Tridgell
302dcd0226 s4-ldbmodify: show the error code as well as error string 2010-01-02 08:16:55 +11:00
Andrew Tridgell
1ab5020ef2 s4-ldb: declate ldb_val_to_time() 2010-01-02 08:16:55 +11:00
Andrew Tridgell
53e86ac5b2 s4-ldb: use safe length limited conversions for int64 and time 2010-01-02 08:16:55 +11:00
Andrew Tridgell
708ad42b0b s4-dsdb: use safe length limiting in string->integer conversion
The ldap.py test suite could trigger a read past the end of the struct
ldb_val buffer
2010-01-02 08:16:55 +11:00
Andrew Tridgell
baae6ef9d2 s4-ldb: added ldb_val_to_time()
This is intended as a replacement for ldb_string_to_time() for ldb_val
inputs. This ensures it is length limited and includes additional
validity checks
2010-01-02 08:16:55 +11:00
Andrew Tridgell
36f8ece9de s4-ldb: show the error code as well as errstr
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:54 +11:00
Andrew Tridgell
e1ffcfc783 s4-ldb: added ldb_module_get_ops()
This is needed to support DSDB_FLAG_OWN_MODULE

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:51 +11:00
Andrew Tridgell
b34db0840d s4-ldb: use the RELAX control to disable single value checking on replace
When using w2k3 linked attributes we are allowed to have multiple
values on a single valued attribute. This happens when the other
values are deleted.

Setting the RELAX control tell the ldb-tdb backend to not check for
this on replace, which means the caller has to check for single valued
violations.
2010-01-02 08:16:51 +11:00
Andrew Tridgell
f1b6484232 s4-dsdb: split RMD_USN into RMD_LOCAL_USN and RMD_ORIGINATING_USN
We need a separate RMD_LOCAL_USN to allow us to tell what attributes
need to be sent in a getncchanges request. Thanks to Metze for
pointing this out.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Jelmer Vernooij
ea5af6e30c pyldb: Add dom_sid.split in favor of less powerful dom_sid_to_rid().
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:30 +11:00
Matthias Dieter Wallnöfer
1aed373b11 s4:lib/registry/util.c - Reintroduce "FIXME"s
Jelmer suggested to put them in again.
2009-12-30 12:39:55 +01:00
Stefan Metzmacher
d3ee0f021b s4:lib/socket: add socket_get_{remote|local}_addr() to get a tsocket_address instead of a socket_address
metze
2009-12-24 17:38:33 +01:00
Stefan Metzmacher
445baf53a9 s4:lib/socket: add helpers functions to convert between socket_address and tsocket_address
metze
2009-12-24 17:38:32 +01:00
Simo Sorce
7e8b042b07 s4:ldb Fix declaration in the middle of the code 2009-12-23 10:33:26 -05:00
Simo Sorce
4cc0bb7d04 s4: Fix the build 2009-12-23 10:28:44 -05:00
Matthieu Patou
8dc636ad67 s4: tests controls parsing and using for ldbadd/ldbedit/ldbmodify 2009-12-23 08:09:19 -05:00
Matthieu Patou
3bd4f6792c s4: make ldbadd/ldbmodify/ldbdelete really use the --controls switch 2009-12-23 08:09:19 -05:00
Andrew Bartlett
551ea65c96 Samba4 and LDB requires talloc 2.0.1
reported by ewoud@kohlvanwijngaarden.nl
2009-12-22 17:27:03 +11:00
Jelmer Vernooij
5b9e98a382 provision/pyldb: Avoid linking in static python ldb module. 2009-12-21 23:40:12 +01:00
Jelmer Vernooij
1d9a243d68 ldb_wrap: Fix compilation when using system ldb. 2009-12-21 23:40:12 +01:00
Kamen Mazdrashki
ee48f583b5 s4-tort: Tests for "msDS-IntId" attribute implemented
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:44:13 +11:00
Kamen Mazdrashki
c113be8526 s4-tort: Move Schema tests from ldap.py into separate module
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:44:05 +11:00