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

4448 Commits

Author SHA1 Message Date
Sumit Bose
9d7cb4826a remove all '\n' from ldb_debug 2009-07-14 11:21:11 -04:00
Anatoliy Atanasov
e3631da158 Test for schemaUpdateNow command 2009-07-08 14:40:20 +10:00
Andrew Bartlett
f45a9d63e5 s4:ldb Rework use of talloc and ldif objects in python wrapper
The talloc hirarchy here was a bit odd - we would both steal the
parsed ldif onto 'NULL', then reference it onto a python talloc
wrapper.

Now we just leave the reference, after we complete building the object.

Andrew Bartlett
2009-07-06 09:50:47 +10:00
Andrew Bartlett
da45d5215d s4:ldb Fix talloc hirarchy in LDIF parsing code
The problem here was that some parts of the ldb_message were still
attached to the ldb_ldif structure, and when only the message was
taken (and the ldif free'ed to reclaim memory) we refereced free'ed
memory.

Andrew Bartlett
2009-07-06 09:50:47 +10:00
Andrew Bartlett
4e58c7881e s4:ldb Allow rootdse module to build without ldb_private.h
It seems quite reasonable to allow modules to re-initialise the set of
cached DNs on the ldb context.

Andrew Bartlett
2009-06-30 15:30:13 +10:00
Andrew Bartlett
49e5b83aa9 s4: dsdb Avoid using the internal ldb_private.h header
This job is not complete (the partition module remains a unfinished
task), but now we do use the private ldb headers much less.

Andrew Bartlett
2009-06-30 15:12:29 +10:00
Andrew Kroeger
994506ae2e ldb: Properly handle NULL when copying attr lists.
When copying an attribute list, ensure the list itself is not NULL before
attempting to access elements of the list.
2009-06-29 13:40:08 +10:00
Andrew Bartlett
5c19c60c57 s4:ldb Add test for integer normalisation behaviour
This uses groupType as the example, but this actually applies to all
integer types in AD.

Andrew Bartlett
2009-06-19 11:32:01 +10:00
Matthias Dieter Wallnöfer
2627c6c0c2 Fixed some uninitialised variables
I tried hard to not change the program logic. Should fix bug #6439.
2009-06-19 11:32:01 +10:00
Matthias Dieter Wallnöfer
0376d056e5 Correct handling of 32-bit integer attributes in SAMBA 4
- LDB handles now all 32-bit integer attributes correctly (also with overflows)
  according to the schema
- LDAP backends handle the attributes "groupType", "userAccountControl" and
  "sAMAccountType" correctly. This handling doesn't yet use the schema but
  the conversion file "simple_ldap.map.c" which contains them hardcoded.
  Did also a refactoring of the conversion function there.
- Bug #6136 should be gone
2009-06-19 11:32:01 +10:00
Andrew Bartlett
79454b50fc Bump the ldb version and the version Samba4 requires.
We have made a lot of useful changes to LDB since the last realese,
that Samba4 now relies on.  This ensures that a build against a system
LDB will only succeed against the right version.

Andrew Bartlett
2009-06-18 13:50:36 +10:00
Andrew Bartlett
95345986e8 Require the new tdb 1.1.5 (for performance reasons)
While tdb has not changed ABI in a way that requires this, we don't
want Samba4 somehow built against the old version with
performance problems on large, growing databases.

Andrew Bartlett
2009-06-18 13:49:29 +10:00
Slava Semushin
89e979fe99 Fix resource leak in lib/ldb/tools/ldbmodify.c
Patch for bug #6389
2009-06-18 13:49:26 +10:00
Slava Semushin
e0caf399e1 Fix syntax error in lib/ldb/ldb_sqlite3/base160.c
Patch for bug #6388
2009-06-18 13:49:26 +10:00
Eric Sandall
68fd09e24a LDB: Link against both tevent and talloc
Patch for bug #6269

When linking against tevent you also need to link against talloc. This patch
fixes external/libevent.m4 to do so.
2009-06-18 13:49:26 +10:00
Andrew Kroeger
71515ba190 s4: Call va_end() after all va_start()/va_copy() calls.
This corrects the issues reaised in bug #6129, and some others that were not
originally identified.  It also accounts for some code that was in the original
bug report but appears to have since been made common between S3 and S4.

Thanks to Erik Hovland <erik@hovland.org> for the original bug report.
2009-06-18 13:49:25 +10:00
Jelmer Vernooij
4657f52c06 Fix build with system LDB. 2009-06-18 01:21:35 +02:00
Jelmer Vernooij
832b929dde pyldb: Fix three more (minor) memory leaks. 2009-06-17 20:45:40 +02:00
Jelmer Vernooij
4d2baca7be pyldb: Fix memory leak in Dn.get_parent(). 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
0c3769e181 pyldb: Fix memory leak in Dn.concat. 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
f1561cd72b pyldb/tests: Use different dn's everywhere, to easily spot which test is
breaking in gdb.
2009-06-17 20:45:39 +02:00
Jelmer Vernooij
a61e11468a pyldb: Fix another memory leak and reference counting error. 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
0c16676642 pyldb: Fix memory leak of LdbMessage's created from Python. 2009-06-17 20:45:38 +02:00
Jelmer Vernooij
d558d8ab94 pyldb: Fix two memory leaks of attribute lists. 2009-06-17 20:45:37 +02:00
Jelmer Vernooij
c3770f1dc0 pyldb: Fix segfault, freeing memory too early in search. 2009-06-17 20:45:37 +02:00
Jelmer Vernooij
2f27d0c762 pyldb: Support getting the parent of special DNs without segfaulting.
Found by: Андрей Григорьев <andrew@ei-grad.ru>
2009-06-17 20:45:37 +02:00
Andrew Tridgell
6836b16dda fixed server side sort control
when sorting a record that does not have the requested sort attribute
then put those records last in the sort result
2009-06-10 10:33:53 +10:00
Andrew Tridgell
48dbfc89cf fixed server side sorting of case-insensitive strings
The sort module uses ldb_comparison_fold() as the comparison function
for case-insensitive attributes. In other places the function is being
used to produce a boolean, but for sorting we care about ordering.

The n1 - n2 return was sorting by length, not value
2009-06-10 10:13:55 +10:00
Timur I. Bakeyev
c41a12f8ba rl_event_hook detection
This patch is relevant for Samba4 source mostly. The way, how readline
compiled under FreeBSD makes it require stdio.h to get all the necessary
declarations. Without this addition rl_event_hook is not properly detected.

With regards,
Timur Bakeyev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-06-08 13:20:51 +02:00
Volker Lendecke
b4d7607a52 Fix some nonempty blank lines 2009-06-06 10:42:55 +02:00
Andrew Tridgell
0849c1ef77 fixed ldb rename now that we have unique indexes
With unique indexes, any rename of a record that has an attribute that
is uniquely indexed needs to be done as a delete followed by an add,
otherwse you'll get an error that the attribute value already exists.
2009-06-04 14:10:11 +10:00
Jelmer Vernooij
8d966fac41 Fix unresolved symbol in python messaging module. 2009-06-02 18:05:42 +02:00
Jelmer Vernooij
688efbbc68 Fix finding the LDB header files in the system in pyldb_util. 2009-06-02 18:05:41 +02:00
Jelmer Vernooij
6ace18904d Fix more unresolved symbols. 2009-06-02 18:05:41 +02:00
Jelmer Vernooij
fe2b04b4bb python: Move helper functions for using param into a separate file rather
than linking against the python module.
2009-06-02 18:05:40 +02:00
Jelmer Vernooij
42fa7ec823 Split up Python code a little bit so we don't hav eto link python modules
to each other.
2009-06-02 18:05:40 +02:00
Andrew Tridgell
73c8566d95 use the unique flag on ldb attributes to optimise & clauses
When a attribute is marked unique we know that if we find a match
it will be the only possible match. This means that in a list of
subtrees connected by an &, it is best to first load the index values
for the unique entries, as if they find something then we know we
won't have to look any further.

This helps with searches like this:

  (&(objectclass=user)(samaccountname=tridge))

the old code would first have loaded the very large index for the
objectclass=user attribute, and then loaded the single entry for
samaccountname=tridge. Now we load the samaccountname=tridge entry
first, notice that it gives us a single result, and stop, thereby
skipping the load of the objectclass=user index record completely.
2009-06-01 22:03:20 +10:00
Andrew Tridgell
5a39817212 added support for unique indexing in ldb
When a attribute is marked as LDB_ATTR_FLAG_UNIQUE_INDEX then attempts
to add a 2nd record that has the same attribute value for this
attribute as another record will fail.

This provides a much more efficient mechanism for ensuring that
attributes like objectGUID are unique
2009-06-01 16:36:21 +10:00
Andrew Tridgell
7f16c29f10 when comp_num is zero, the case folded DN is always ""
This fixes a bug where we would look at an uninitialised
dn->linearized
2009-06-01 12:58:48 +10:00
Andrew Tridgell
5ab03dbecc Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-05-28 16:12:34 +10:00
Andrew Tridgell
47692f39b1 a useful debugging tool
When looking at performance problems with ldb it can be useful to see
which searches causes unindexed full searches. This makes it easy to
enable that.
2009-05-28 16:11:45 +10:00
Andrew Tridgell
0a0d760704 fixed one-level indexing
one-level indexing was not always effective due to some broken logic
in the indexing code. This change means that if normal indexing fails,
we can still fall back on one-level indexing.

This reduces the number of full unindexed searches in s4 quite a lot
2009-05-28 16:10:47 +10:00
Andrew Kroeger
b21656f09a s4:tevent: Increase trace debug level to 50.
The sheer volume of messages generated by tevent when the trace level is set to
10 makes it difficult to debug issues in a level 10 log.  Increasing this to
50 allows tevent tracing to be enabled if needed, but otherwise keeps the extra
chatter out of a level 10 log.
2009-05-27 07:58:07 +10:00
Andrew Kroeger
bf863bccb6 s4:ldb:modules: Correct typos. 2009-05-26 16:38:39 -04:00
Jelmer Vernooij
6230eb94af Update copies of config.guess and config.sub. 2009-05-16 04:03:12 +02:00
Jelmer Vernooij
af6316d150 Provide a ldb_global_init() function for compatibility with older versions of LDB
(including the one in Samba 3).
2009-04-23 18:59:37 +02:00
Jelmer Vernooij
80420745ff Add a new non-convenience version of push_codepoint. 2009-04-23 17:50:18 +02:00
Andrew Bartlett
82ad66e9df s4:ldb Make it possible to re-run ldap.py again
The parentGUID test didn't clean up after itself correctly.

Andrew Bartlett
2009-04-14 10:52:33 +10:00
Andrew Tridgell
b202911123 don't load @ATTRIBUTES if we have an override handler in place 2009-04-07 16:34:18 +10:00
Andrew Tridgell
9181637170 fixed internal handling of attribute deletion 2009-04-07 16:33:54 +10:00