1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

88 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
4a2b78a6f3 LDB:SQLITE3 backend - change counter variables to "unsigned" where appropriate 2010-03-08 10:29:26 +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
Matthias Dieter Wallnöfer
1ea460b0b0 ldb:backend "connect" functions - convert result values to LDB constants
I think this is better since "ldb_backend_connect" and "ldb_connect" which
propagate those values should return only LDB constants. Therefore a conversion
(especially for "-1") would be needed.
2009-10-25 11:24:54 +01:00
Matthias Dieter Wallnöfer
91456b8dc5 s4:ldb - SQLite: port some constraints from the TDB backend also to the SQLITE one 2009-10-08 00:18:07 +02: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
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
Simo Sorce
a5e570b562 Start restoring the sqlite3 backend
Passes many tests but not all yet.
2009-01-31 20:01:05 -05:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
Separate again the public from the private headers.

Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
2009-01-30 01:02:03 -05:00
Simo Sorce
9f7c2548d9 LDB ASYNC: other backends 2008-09-29 04:22:19 +02:00
Jelmer Vernooij
b0a95ad2f6 Revert LDB return code patches from Matthias. 2008-09-25 00:01:05 +02:00
Matthias Dieter Wallnöfer
9261fa997c Cosmetic corrections for the LDB backend modules
This commit applies some cosmetic corrections for the LDB backend modules.
2008-09-24 19:40:03 +02:00
Andrew Bartlett
5c6364ba06 Remove references to the unused @SUBCLASS feature.
This was removed from ldb_tdb a while ago

Andrew Bartlett
(This used to be commit fcb87e77860b449ac3483ccec5e6b5ed087540f2)
2008-08-18 12:01:27 +10:00
Stefan Metzmacher
e36b159e8c ldb_sqlite: fix the build
metze
(This used to be commit 14c8e3101cc3b0138a551afdf3a94f4bb11bb21d)
2008-02-21 15:52:32 +01:00
Jelmer Vernooij
39a817d310 Fix use of some modules (needed _PUBLIC_).
(This used to be commit ce332130ea77159832da23bab760fa26921719e2)
2008-02-20 04:33:43 +01:00
Jelmer Vernooij
995788536e Remove more function-based inits.
(This used to be commit b1a7810f3e70f9a831d9b8e85d531e448072adaf)
2008-02-20 02:57:07 +01:00
Andrew Tridgell
6c973f4e8c r23798: updated old Temple Place FSF addresses to new URL
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10 14:59:15 -05:00
Andrew Tridgell
b8d69a7ea2 r23795: more v2->v3 conversion
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10 14:59:14 -05:00
Stefan Metzmacher
56ab0cd77c r22746: fix the build of the sqlite module
metze
(This used to be commit cd958034df67a606492b69e55f1f4bc5fa95383b)
2007-10-10 14:52:08 -05:00
Stefan Metzmacher
538e3bf654 r20185: - SMB_ENABLE() needs upper case YES/NO
- fix compilation of the ldb_sqlite3 module

metze
(This used to be commit 39c41be0ac5bfa39c4ff3267b1a8291857e3a034)
2007-10-10 14:29:19 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
2007-10-10 14:28:22 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10 14:28:22 -05:00
Simo Sorce
a326893159 r19461: Make sqlite3 work again (semi-async)
Still not all tests pass
(This used to be commit cbfc7305ad594c672a16a7f6f82758d17eb5ba62)
2007-10-10 14:21:36 -05:00
Andrew Tridgell
e36ea2e8eb r19362: - don't need to store the baseinfo message after cache load
- set better names on talloc structures in ldb modules, making leaks
  easier to track down
(This used to be commit 3bf76db42dc6dde5d71083216dba819869b31c75)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
05cdd9ccaf r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface
exposed.

Unfortunately this generates a large number of type punning
warnings. We'll have to find some magic to hide those.
(This used to be commit 254cbf09dee5a1e20c47e47a298f1a8d172b41b9)
2007-10-10 14:18:29 -05:00
Andrew Tridgell
7f63cebd33 r18436: converted ldb to use talloc_move() instead of talloc_steal() when
appropriate.

Note that I also removed the error checks that were being done on the
result of talloc_steal(). They are pointless as talloc_steal() doesn't
have any failure modes that wouldn't cause a segv anyway, and they
tend to clutter the code
(This used to be commit c0d9e7d473b8e3eb2524a9fc29cf88680f994b36)
2007-10-10 14:18:29 -05:00
Simo Sorce
faed817506 r17514: Simplify the way to set ldb errors and add another
helper function to set them.
(This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
2007-10-10 14:15:31 -05:00
Simo Sorce
49f68caed2 r17186: "async" word abuse clean-up part 2
(This used to be commit c6aa60c7e69abf1f83efc150b1c3ed02751c45fc)
2007-10-10 14:10:17 -05:00
Simo Sorce
c93817b36d r17185: Oh, I wanted to do this for sooo long time.
Finally acknowledge that ldb is inherently async and does not have a dual personality anymore
Rename all ldb_async_XXX functions to ldb_XXX except for ldb_async_result, it is now ldb_reply
to reflect the real function of this structure.

Simo.
(This used to be commit 25fc7354049d62efeba17681ef1cdd326bc3f2ef)
2007-10-10 14:10:16 -05:00
Tim Potter
7d7e43d94f r16090: Fix standalone build after the rename of enum ldb_request_type in
r15944.

Hey idra I think a better rename would be to keep the LDB_REQ suffix
here to remain consistent with the other enums (e.g ldb_reply_type,
ldb_async_wait_type and ldb_async_state).
(This used to be commit d44ee8c43bd8f6f978330a8ded8bf30ffad494d6)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
d912d6fcef r16087: Fix silly cut-and-paste typo that cost me much of my afternoon...
This only affects my new partitions module, which I will post soon,
but should be fixed anyway.

Andrew Bartlett
(This used to be commit 8912c4e057eb3962321245cf49b92999afcc64fc)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
247af0d569 r16083: Make it possible to initialise a backend module, without it setting up
the whole ldb structure.

Because the sequence number was a fn pointer on the main ldb context,
turn it into a full request (currently sync).

Andrew Bartlett
(This used to be commit fbe7d0ca9031e292b2d2fae263233c973982980a)
2007-10-10 14:08:57 -05:00
Andrew Tridgell
971d30bb20 r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617589ac6df4f527877241464cacbf8b3)
2007-10-10 14:08:32 -05:00
Simo Sorce
3baf060604 r14161: return early if we know the job is already finished
(This used to be commit 09f6f552d73f782dc8d62cefad9c5f584b7b07d2)
2007-10-10 13:56:56 -05:00
Simo Sorce
257598424e r13996: simplify ldb_async_wait() some more
(This used to be commit ef1b3e6368179fe86ae07b8d00e4668090175551)
2007-10-10 13:52:36 -05:00
Simo Sorce
7b82c4beb9 r13992: change the way ldb_async_wait() works.
I think I should change the name of this function
to ldb_async_process(), any opinions ?
(This used to be commit 3347322d1327cfa975ee9dccd4f2774e6e14fbcb)
2007-10-10 13:52:34 -05:00
Jelmer Vernooij
5d0aa16dfc r13839: Use registration mechanism for backends as well (in the same sense
my previous patch added it for modules). This is the next step towards
LDB backends and modules as run-time loadable .so files.
(This used to be commit fb2f70de4f6c4a9b13ad590cb4d3a9c858cede49)
2007-10-10 13:52:14 -05:00
Simo Sorce
e07f36a48c r13826: Try to keep this backend updated
This need more testing and to be built by default when possible
(This used to be commit 76cbab0e252620ef6591e2a7354484660bbb6df5)
2007-10-10 13:52:14 -05:00
Simo Sorce
d590dea10b r13615: Make ldb_set_errstring get ldb instead of module as parameter.
The module was just used to get to the ldb so it was meningless.

Also add LDB_WAIT_ONCE e relative code in ldb_ildap.c
(This used to be commit d5b467b7c132b0bd4d23918ba7bf3370b1afcce8)
2007-10-10 13:51:59 -05:00
Simo Sorce
00fe70e5b9 r13609: Get in the initial work on making ldb async
Currently only ldb_ildap is async, the plan
is to first make all backend support the async calls,
and then remove the sync functions from backends and
keep the only in the API.

Modules will need to be transformed along the way.

Simo
(This used to be commit 1e2c13b2d52de7c534493dd79a2c0596a3e8c1f5)
2007-10-10 13:51:59 -05:00
Simo Sorce
04396c36d3 r13333: revert previous commit I will use ldb_caseless_cmp in attrib_handlers
to correctly support utf8 comparisons

add an ldb_attr_Casefold function for attribute names and use it
instead of casefold in the right places
(This used to be commit 3b4eb2413bbce059dde69f35c03cdc3cc2ba85c5)
2007-10-10 13:51:45 -05:00
Simo Sorce
f5ebc8e404 r13324: From now on check attribute names obey rfc2251
Also add a way to provide utf8 compliant functions
by registering them with ldb_set_utf8_fns()

Next comes code to register samba internal utf8 functions.

Simo.
(This used to be commit ac9b8a41ffca8e06c5e849d544d3203a665b8e0d)
2007-10-10 13:51:44 -05:00
Stefan Metzmacher
4d1c5a023c r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later.

metze
(This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
2007-10-10 13:50:03 -05:00
Simo Sorce
dbef4d76de r12743: Remove the ugly way we had to make a second stage init and introduce
a second_stage_init private function for modules that need a second stage init.

Simo.
(This used to be commit 5e8b365fa2d93801a5de1d9ea76ce9d5546bd248)
2007-10-10 13:49:48 -05:00
Simo Sorce
c908d0b2aa r12733: Merge ldap/ldb controls into main tree
There's still lot of work to do but the patch is stable
enough to be pushed into the main samba4 tree.

Simo.
(This used to be commit 77125feaff252cab44d26593093a9c211c846ce8)
2007-10-10 13:49:47 -05:00
Simo Sorce
5c95905871 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.
(This used to be commit 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10 13:45:53 -05:00
Andrew Tridgell
5fd031c97d r10753: don't require every ldb module to implement both a search_bytree() and
a search() function, instead each module now only implements the
bytree method, and the expression based search is handled generically
by the modules code. This makes for more consistency and less code
duplication.

fixed the tdb backend to handle BASE searches much more
efficiently. They now always only lookup one record, regardless of the
search expression
(This used to be commit 7e44f9153c5578624e2fca04cdc0a00af0fd9eb4)
2007-10-10 13:39:26 -05:00
Simo Sorce
63b43dd12f r10477: expose transactions outside ldb and change the API once more
do not autostart transactions on ldb operations if a transaction is already in place
test transactions on winsdb

all my tests passes so far
tridge please confirm this is ok for you
(This used to be commit c2bb2a36bdbe0ec7519697a9a9ba7526a0defac2)
2007-10-10 13:38:52 -05:00
Andrew Tridgell
d78ea3e34a r10406: added --nosync option to all ldb tools, so that you can control if
transactions are synchronous or not on the command line.

add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary
ldb databases non-synchronous
(This used to be commit dba41164e0c52f1e4351bd9057b16661cee3a822)
2007-10-10 13:38:41 -05:00
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