1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-23 20:23:50 +03:00
Commit Graph

73 Commits

Author SHA1 Message Date
Simo Sorce
4de76fd09e r13742: Fix tests to work better with ldap 2007-10-10 13:52:08 -05:00
Simo Sorce
5d93c1eeba r13348: Put a reminder for now.
Until we do not have an internal utf8 compliant
casefloding function we cannot pass this test
in the non-samba build
2007-10-10 13:51:47 -05:00
Simo Sorce
ad189553f4 r12828: add a test to check white spaces comparison 2007-10-10 13:50:03 -05:00
Stefan Metzmacher
7e702939fa r12777: use TEST_DATA_PREFIX if available
metze
2007-10-10 13:49:53 -05:00
Simo Sorce
22c8c97e6f r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
2007-10-10 13:45:53 -05:00
Andrew Tridgell
b2551e76e8 r10856: we need aclocal.m4 in ldb for standalone configure 2007-10-10 13:39:37 -05:00
Andrew Tridgell
d267f8c623 r10423: minor changes to the ldb test suite to allow it to work correctly with
a real ldap backend (such as openldap)
2007-10-10 13:38:44 -05:00
Simo Sorce
4357a2db5e r10251: some more work on ldb_sqlite3
I must say that writing a new module is a very good way
to find lot of subtle bugs laying in the code

We need more tests!

commit oLschema2ldif.c to keep it safe from data losses (rm -fr :-)

update test generic to reflect the fix made on comparsion functions
2007-10-10 13:38:11 -05:00
Simo Sorce
ace9990060 r10232: Some work on ldb_sqlite3.
It is still far from being usable in samba4 but I want to commit
so that the work does not get lost by mistake.
This is also a good way to get comments if somebody is interested.

Sorry Derrell I ended up rewriting large parts of the code but I find
this style much more readable. Thanks for the hard work done. Your
work was a good reference for me.

ah the current code also shows some good numbers

sqlite3 generic test:
uid search took 0.05 seconds
real    0m12.492s
user    0m0.492s
sys     0m0.345s

with tdb we still get better numbers:
uid search took 0.46 seconds
real    0m0.892s
user    0m0.360s
sys     0m0.468s

but most of the time is spent in adding operations and I think
there's still a lot of space for improvement.

Simo.
2007-10-10 13:38:10 -05:00
Jelmer Vernooij
77f24ed131 r9813: Conver testsuite for samba3sam module to EJS 2007-10-10 13:35:04 -05:00
Jelmer Vernooij
eb9d615bcd r9786: Move ldb_map into ldb/modules/
Move samba3sam to dsdb/
2007-10-10 13:35:01 -05:00
Jelmer Vernooij
d9541535e3 r9770: Couple other bugfixes
Update TODO-list
2007-10-10 13:34:58 -05:00
Jelmer Vernooij
435e4c6389 r9744: - [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB
2007-10-10 13:34:55 -05:00
Jelmer Vernooij
b1844905d2 r9718: Work a bit on the SWAT interface 2007-10-10 13:34:53 -05:00
Jelmer Vernooij
b7b079167d r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
2007-10-10 13:34:42 -05:00
Jelmer Vernooij
0cff0e03fc r9690: Extend test + fix several bugs 2007-10-10 13:34:41 -05:00
Jelmer Vernooij
7f864d446d r9685: Add tests for samba3sam mapping module
Fix a couple of bugs
Move samba3sam backend to lib/ldb/
Remove some more unused parameters
2007-10-10 13:34:41 -05:00
Simo Sorce
10e4ebcc42 r9446: clean up old test file 2007-10-10 13:34:15 -05:00
Simo Sorce
a9e8cd0bad r8585: add to ldb and ldap comparison functionality
better pares filters
Approx is currently only a stub need to dig more info to
understand what it really means and how it works exactly
2007-10-10 13:29:41 -05:00
Andrew Tridgell
6b20bcbeeb r8490: make the ldb tests more portable 2007-10-10 13:23:09 -05:00
Andrew Tridgell
9f29cccbc1 r8485: - be friendly to shells other than bash
- don't use /tmp in test paths, as that opens us to symlink attacks
2007-10-10 13:23:08 -05:00
Simo Sorce
ed804262dc r8377: forgot an ldif test 2007-10-10 13:20:14 -05:00
Simo Sorce
4eb5863042 r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code
removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently
adds some more tests for wildcard matching
fixes dn comparison code in ldb_match
2007-10-10 13:20:13 -05:00
Simo Sorce
624a73148d r8082: large rewite of ldb_dn.c
- we do not support multpiple attribute components anymore, makes code a lot easier
  they will be readded later if we found out they are really used, so far my tests
  show w2k3 do not handle them as well

- fix escaping issues, move component value to be in an ldb_val structure
  still need to handle binary values case

- make cononicalize functions leak less memory by giving a specific memory context

- fix tests scripts so that test-ldap can start
- make test not delete databases on completion so that I can inspect them
2007-10-10 13:19:06 -05:00
Andrew Tridgell
c03753faa4 r8071: reduce the size of the default ldb tests. We run on some pretty low powered machines
in the farm, and don't want to chew too much cpu needlessly.
2007-10-10 13:19:05 -05:00
Andrew Tridgell
60863b6faf r8043: increase shell compatibility of ldb tests 2007-10-10 13:19:02 -05:00
Andrew Tridgell
f3e3b2ccd9 r8039: allow ldb test suite to be run outside of the ldb directory 2007-10-10 13:19:01 -05:00
Andrew Tridgell
a9c3244503 r8035: added indexing tests. current ldb fails the integer indexing, will be fixed shortly 2007-10-10 13:19:00 -05:00
Andrew Tridgell
ad6e62fdcf r8033: - add easier valgrind testing
- add tests for the @SUBCLASSES ltdb special
2007-10-10 13:19:00 -05:00
Andrew Tridgell
5efea40ea6 r8011: arrgh, commit the right version this time 2007-10-10 13:18:58 -05:00
Andrew Tridgell
25d3872a6e r8010: added testing of wildcard attributes 2007-10-10 13:18:58 -05:00
Andrew Tridgell
5801167c8d r8009: expanded the ldb test suite. It worried me that some changes I have
pending, which I know break lots of features, still passed our test
suite! Now they don't.
2007-10-10 13:18:58 -05:00
Andrew Tridgell
42c42f6611 r7834: added comment about the "((" search test 2007-10-10 13:18:41 -05:00
Andrew Tridgell
91cc009fed r7833: changed ldbsearch and ldbedit to have command line syntax closer to
ldapsearch. They look for an '=' in the first argument to see if it is
a search expression, and if not then it does an 'all records' search
2007-10-10 13:18:41 -05:00
Andrew Tridgell
20c84f5c52 r7832: missed one 2007-10-10 13:18:41 -05:00
Andrew Tridgell
2a426f654d r7831: use cn=TEST as base of test DNs so we don't interfere with potentially real records 2007-10-10 13:18:41 -05:00
Derrell Lipman
1dd8650055 r7828: Although there is still plenty to do, ldb_sqlite3 now passes the set of tests
in tests/test-sqlite3.sh (tests/test-generic.sh).

There are lots of optimizations still TBD, and some things are REALLY slow
right now (e.g. each add() operation takes 1/3 - 1/2 second) but it's ready for
interested parties to poke it and prod it and see how (un)reasonable it is.
Play away.

Still to be implemented or improved:
 - tdb specials (@MODULES, @SUBCLASSES, etc.)
 - all DNs are case-folded in their entirty right now (since doing otherwise
   would require @ATTRIBUTES to be implemented)
 - speed improvements and optimizations.  I am quite confident that the
   excessively slow add() operation can be much improved, and other areas
   can be somewhat improved.
2007-10-10 13:18:41 -05:00
Simo Sorce
2b2675055e r7806: add test for binary files as attribute values 2007-10-10 13:18:38 -05:00
Andrew Tridgell
f648fdf187 r7709: - convert ldb to use popt, so that it can interact with the samba
cmdline credentials code (which will be done soon)

- added a ldb_init() call, and changed ldb_connect() to take a ldb
  context. This allows for much better error handling in
  ldb_connect(), and also made the popt conversion easier

- fixed up all the existing backends with the new syntax

- improved error handling in *_connect()

- fixed a crash bug in the new case_fold_required() code

- ensured that ltdb_rename() and all ltdb_search() paths get the read lock

- added a ldb_oom() macro to make it easier to report out of memory
  situations in ldb code
2007-10-10 13:18:24 -05:00
Simo Sorce
b38bb63175 r7615: fix the build and simplify gendb_search_dn 2007-10-10 13:18:14 -05:00
Simo Sorce
a614466dec r7582: Better way to have a fast path searching for a specific DN.
Old way was ugly and had a bug, you couldn't add an attribute named
dn or distinguishedName and search for it, tdb would change that search in a dn search.
This makes it also possible to search by dn against an ldap server as the old method was
not supported by ldap syntaxes.

sss
2007-10-10 13:18:11 -05:00
Andrew Tridgell
73d2e5df0c r7572: fixed filter in test suite 2007-10-10 13:18:11 -05:00
Andrew Tridgell
853b8cd72d r7564: added a test showing the search expression that w2k is actually giving
us that triggered this work
2007-10-10 13:18:09 -05:00
Andrew Tridgell
7b58b3a9c5 r7560: added tests for extended bitop search functions 2007-10-10 13:18:08 -05:00
Simo Sorce
c226c1c7a3 r7338: let it be possible to run sqlite3 tests when it is compiled in
make it also so that we do not run test for modules we do not compile in
2007-10-10 13:17:44 -05:00
Simo Sorce
9293de1c35 r7239: add a little test 2007-10-10 13:17:30 -05:00
Simo Sorce
1295b891a2 r6867: this code will change the way the @ATTRIBUTES object is handled
this object properties are now used as multivalue attributes
now all values inserted are checked against a "valid values table"

eg:

this form is now accepted:

dn: @ATTRIBUTES
uid: CASE_INSENSITIVE
uid: WILDCARD

this form is now rejected:

dn: @ATTRIBUTES
uid: CASE_INSENSITIVE WILDCARD

please update your .ldb files if you make use of @ATTRIBUTES
(sam.ldb heavily uses it)

the code passes all make test tests for both tdb and ldap, it also
passes the new test to check for wrong @ATTRIBUTES attribute values

Simo.
2007-10-10 13:16:52 -05:00
Simo Sorce
0579b5f7ad r5670: simplify and clarify ldb_modules.c code
rectify the test schema
correct a glitch in schema module
2007-10-10 13:10:58 -05:00
Andrew Tridgell
0f034dc563 r5374: - changed the dn key code in the ldb tdb backend to correctly honor
the case sensitive/insensitive flags on sections of a dn. So if a dn
  is made up of 4 attributes, and 2 of those are case insensitive and 2
  are case sensitive, then all the attribute names are uppercases, but
  only the values of the case insensitive attributes are uppercased when
  forming the tdb key.

- added code to canonicalise the dn, removing leading and trailing
  spaces from attribute names and values

- when the @ATTRIBUTES record changes, fix the dn keys of any records that should now have new
  dn keys due to changes in the case sensitivity of the record

I really did this to allow me to make the WINS database properly case
insensitive, but it is also the correct general fix for ldb, as it
matches the LDAP specification (and w2k LDAP server behaviour)
2007-10-10 13:09:48 -05:00
Simo Sorce
0315159daf r4862: - better structure schema tests
- fix check for deletion of required attributes on modify
  removed by mistake with the previous commits
2007-10-10 13:09:00 -05:00