1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

40 Commits

Author SHA1 Message Date
Simo Sorce
16aff2a184 r10305: start implementing better error handling
changed the prioivate modules API
error string are now not spread over all
modules but are kept in  a single place.

This allows a better control of memory
and error reporting.
(This used to be commit 3fc676ac1d6f59d08bedbbd9377986154cf84ce4)
2007-10-10 13:38:16 -05:00
Simo Sorce
8919d6bf9a r10299: remove the public (un)lock functions and introduce a transaction based
private ldb API

ldb_sqlite3 is already working with this model and ldb_tdb will do
as soon as tridge finishes the tdb transaction code.

currently the transactions are always implicit and wrap any single
ldb API call except searching, the transaction functions are
currently not made public on purpose.

Simo.
(This used to be commit 1da4ac2cdcb7e54076f85242a93784260dced918)
2007-10-10 13:38:14 -05:00
Simo Sorce
5c708830bc r10277: do not ovverride LIKE, thanks to derrel I found out how to do
the same thing with a harmless user function
(This used to be commit 158693b4064bd731aa4f6cdb2fde51d7aa596cf5)
2007-10-10 13:38:13 -05:00
Simo Sorce
d8da5e4fb7 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
(This used to be commit 4357a2db5eadb15519ed93b957b2bad25ebf2a7d)
2007-10-10 13:38:11 -05:00
Simo Sorce
f77e859e48 r10236: fix (C) note
(This used to be commit 466e6812c35af9096fea05520c6b59a19793c4d1)
2007-10-10 13:38:10 -05:00
Simo Sorce
36d6ebf376 r10233: add commented PRAGMA to avoid fsyncs
(This used to be commit e5d8d834600040793c1e45c7aaceb374df2b3839)
2007-10-10 13:38:10 -05:00
Simo Sorce
38b04883fe 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.
(This used to be commit ace9990060c10d0931f418934b2121aea9512ff7)
2007-10-10 13:38:10 -05:00
Derrell Lipman
1603fd9466 r7897: work in progress
(This used to be commit 8e1431efcf0df797bc50ef584c38fce6a03429b3)
2007-10-10 13:18:47 -05:00
Simo Sorce
ce2e35309e r7851: We are case preserving let the DN be returned the same the user put it into.
sss
(This used to be commit 5b41e3202456549250e6e5b1c63bd45ea7500fa3)
2007-10-10 13:18:42 -05:00
Derrell Lipman
f1a853664c r7844: eliminate superfluous attribute tables
(This used to be commit 863beef35b769c5a531819c974754aea2a790921)
2007-10-10 13:18:42 -05:00
Derrell Lipman
fdc0450db2 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.
(This used to be commit 1dd865005594671e7effe06fb088fa97fa08de0b)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
ed3d8091ce 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
(This used to be commit f648fdf187669d6d87d01dd4e786b03cd420f220)
2007-10-10 13:18:24 -05:00
Derrell Lipman
f021dffb69 r7601: ldb_sqlite3 work in progress
(This used to be commit 0a64948152a446b5e127578d49b1ed8a90a1a222)
2007-10-10 13:18:13 -05:00
Derrell Lipman
c2747479e0 r7586: ldb_sqlite3 making progress. add and search have indicated a willingness to operate properly on initial testing
(This used to be commit 86ca8639e0ddc2525f8ed0ca9879d9f98c0cd00e)
2007-10-10 13:18:11 -05:00
Derrell Lipman
81b4183e1c r7562: work in progress
(This used to be commit d8a9ce78533639f510b60b48c8f305bd07f3f717)
2007-10-10 13:18:09 -05:00
Andrew Tridgell
4fec6356ea r7558: added support in ldb for extended ldap search requests. These are
using to perform such things as bitop tests on integers.

So far I have only added support for the 1.2.840.113556.1.4.803 and
1.2.840.113556.1.4.804 rules, which are for bitwise and/or
(This used to be commit 5f773b065f1db959e59c02de68bcf30cef1a6c2c)
2007-10-10 13:18:08 -05:00
Andrew Tridgell
4b0e5bd753 r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
instead of a search expression. This allows our ldap server to pass
  its ASN.1 parsed search expressions straight to ldb, instead of going
  via strings.

- updated all the ldb modules code to handle the new interface

- got rid of the separate ldb_parse.h now that the ldb_parse
  structures are exposed externally

- moved to C99 structure initialisation in ldb

- switched ldap server to using ldb_search_bytree()
(This used to be commit 96620ab2ee5d440bbbc51c1bc0cad9977770f897)
2007-10-10 13:18:06 -05:00
Derrell Lipman
2e1851e1ac r7498: ldb_sqlite3 work in progress
(This used to be commit 797263330b9eada019e432ff201bf5c872e35b5d)
2007-10-10 13:18:00 -05:00
Derrell Lipman
0264c1792d r7480: ldb_sqlite3 work in progress
(This used to be commit 510e7994da808ab12f51fa7a36c3f5f9244c51ac)
2007-10-10 13:17:57 -05:00
Derrell Lipman
5351ae59a0 r7449: add ctype.h header to dn expand function
(This used to be commit 0e3b872560d82e1a0f7b58fe7d210563d6d29daf)
2007-10-10 13:17:54 -05:00
Derrell Lipman
b501bf17ab r7443: reorg functions for readability
(This used to be commit 7543acfa9fe87b43cfee482cf02e56d73d29596b)
2007-10-10 13:17:54 -05:00
Derrell Lipman
ee3f4b12d2 r7438: work in progress
(This used to be commit 2fc5343f0637ef3109b079dbc33d6cf4e58c8d5e)
2007-10-10 13:17:53 -05:00
Derrell Lipman
c63c28f5bd r7437: Make Simo happy.
I still think this URI syntax for a 'protocol' which has no network component
is stupid; it should just be

  sqlite:local_file
or
  sqlite:/full/path/to/file

but there is enough precedent to warrant the behavior that Simo wants that it
is not worth arguing.
(This used to be commit 61dcb462f30a65256e263e87c192ed7f5280c7af)
2007-10-10 13:17:53 -05:00
Derrell Lipman
a6717fae68 r7418: work in progress
(This used to be commit 2a13e7655b1bce88694ddbb6a4d9349008ba42f0)
2007-10-10 13:17:51 -05:00
Derrell Lipman
7fc1c3553c r7408: added DN explode function, based on simo's ldap_parse_dn() function. simo, when you get a chance, please change your license so this can be linked with ldb.
(This used to be commit 588a1d1451d4117cb6e427a293455f2a5657b604)
2007-10-10 13:17:50 -05:00
Derrell Lipman
f08fafc492 r7349: work in progress
(This used to be commit 0e4d9729d99a1a148a951878188fe1955713aea4)
2007-10-10 13:17:45 -05:00
Simo Sorce
ca7baa3c9f r7343: handle url like ldb_tdb does
(This used to be commit d36fde5c0cfe20d03dd99e2ffffdd13acf9f76f3)
2007-10-10 13:17:45 -05:00
Derrell Lipman
b8e8e5ed4e r7332: added note to self for required modification
(This used to be commit 8fa340c1d4423673e5a935f815491534413d9536)
2007-10-10 13:17:43 -05:00
Derrell Lipman
34ffdb12fc r7316: work in progress
(This used to be commit 84a2b4049fde7db0d563e639e99364f40a47ace9)
2007-10-10 13:17:41 -05:00
Andrew Bartlett
c88d65a862 r7292: Fix up the build system support for derrell's sqlite3 ldb backend.
It is on by default, so I've also fixed a build issue in it.  I'll
show how to make it off be default in the next commit.

Andrew Bartlett
(This used to be commit 5a1ef888100e8ef803100a6341133d96e8a400b0)
2007-10-10 13:17:37 -05:00
Derrell Lipman
06cc74a66c r7287: work in progress. no more time to work on this right now. save latest changes.
(This used to be commit 94cbef9211597d8cdd6b5ab7bc9b655026be283a)
2007-10-10 13:17:36 -05:00
Derrell Lipman
217a8cfe66 r7282: ldb_sqlite3 work in progress.
(This used to be commit d934c42b00b68e8f4ac9d0583ac307818aeb494f)
2007-10-10 13:17:36 -05:00
Derrell Lipman
150f127aa3 r7281: removing document
(This used to be commit 6867d56796ce4dd85c69107c6a0a5cf4bf93f585)
2007-10-10 13:17:36 -05:00
Derrell Lipman
ec9bdca186 r7280: taking advantage of previous research. this is documentation on which latest schema is based
(This used to be commit 603faa9cabd6d83c2e0fcfea476c5bda3f76b741)
2007-10-10 13:17:35 -05:00
Derrell Lipman
a1ba224107 r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can be
called from multiple backends.  (ldb_sqlite3 needs it too.)  Added parameter
  for a callback function that determines whether an attribute needs case
  folding.
- begin to prepare for sqlite3 in build process
- work-in-progress updates, on ldb_sqlite3
(This used to be commit a80bced0b96ffb655559a43cf7f4d7a34deb5a7d)
2007-10-10 13:17:35 -05:00
Derrell Lipman
6ade5fc245 r7260: save current schema before I blow it away to try something different
(This used to be commit 676a9824934576056208d30ce34716cfb734ce58)
2007-10-10 13:17:33 -05:00
Derrell Lipman
913c19cd5b r7133: work in progress, including a HIGHLY revised and simplified schema
(This used to be commit aa9bb6ad4cb7219a80a6589d406e47a15ac2c3a1)
2007-10-10 13:17:20 -05:00
Derrell Lipman
a3972de894 r7116: work in progress
(This used to be commit c860a4f9940c04021ecc859240c5f35c3d1c4bed)
2007-10-10 13:17:18 -05:00
Derrell Lipman
a81630c0c4 r6984: added tree representation documentation and utility code, to be used for subclasses of object classes
(This used to be commit 7aca32dca6daac54ac77a66438bc5168d5e04227)
2007-10-10 13:17:02 -05:00
Derrell Lipman
26eff174ee r6956: added start of ldb_sqlite3 work
(This used to be commit ac396a4a53756f40ad5e1d45ca23e002f9c649e7)
2007-10-10 13:17:00 -05:00