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

4829 Commits

Author SHA1 Message Date
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