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

32 Commits

Author SHA1 Message Date
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Stefan Metzmacher
545f769c2f r21354: fix comment
metze
2007-10-10 14:48:18 -05:00
Stefan Metzmacher
b97b8f5dcb r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct.

the default attribute handler is now registered dynamicly as "*"
attribute, instead of having its own code path.

ldb_schema_attribute's can be added to the ldb_schema given a
ldb_schema_syntax struct or the syntax name

we may also need to introduce a ldb_schema_matching_rule,
and add a pointer to a default ldb_schema_matching_rule
in the ldb_schema_syntax.

metze
2007-10-10 14:29:19 -05:00
Andrew Bartlett
72858f8594 r18781: Move the usnCreated and usnChanged handling around again.
This moves these attributes from objectguid into an optional backend
(objectguid), used by ltdb.  For OpenLDAP, the entryUUID module
converts entryCSN into usnChanged.

This also changes the sequence number API, and uses 'time based'
sequence numbers, when an LDAP or similar backend is detected.

To assist this, we also store the last modified time in the TDB,
whenever we change a value.

Andrew Bartlett
2007-10-10 14:19:11 -05:00
Andrew Tridgell
eba6c84eff r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
2007-10-10 14:18:04 -05:00
Andrew Bartlett
af02b4d7c6 r17526: Move timestamp generation into the objectGUID module. It probably
needs to be renamed (operation_add?).

This allows me to match the behaviour and substitute with the
entryUUID module for remote LDAP connections.

Andrew Bartlett
2007-10-10 14:15:33 -05:00
Simo Sorce
260868bae5 r17514: Simplify the way to set ldb errors and add another
helper function to set them.
2007-10-10 14:15:31 -05:00
Simo Sorce
c6aa60c7e6 r17186: "async" word abuse clean-up part 2 2007-10-10 14:10:17 -05:00
Simo Sorce
25fc735404 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.
2007-10-10 14:10:16 -05:00
Andrew Bartlett
a1161cb30e r16972: Replace the sequence_number function pointer in ldb with the ldb flags.
The function pointer was meant to be unused, this patch fixes
partition.c to use ldb_sequence_number().  (No backend provided the
pointer any more).

Set the flags onto the ldb structure, so that all backends opened by
the partitions module inherit the flags.

Set the read-ony flag when accessed as the global catalog

Modify the LDAP server to track that this query is for the global
catalog (by incoming port), and set a opqaue pointer.

Next step is to read that opaque pointer in the partitions module.

Andrew Bartlett
2007-10-10 14:10:04 -05:00
Simo Sorce
b52e5d6a0c r16036: Add a couple of new functions to corretly deal with timeouts.
Check timeouts are correctly verified.
Some minor fixed and removal of unused code.
2007-10-10 14:08:52 -05:00
Simo Sorce
51083de795 r15942: Remove the sync internal ldb calls altogether.
This means that some modules have been disabled as well as they
have not been ported to the async interface

One of them is the ugly objectclass module.
I hope that the change in samldb module will make the MMC happy
without the need of this crappy module, we need proper handling
in a decent schema module.

proxy and ldb_map have also been disabled
ldb_sqlite3 need to be ported as well (currenlty just broken).
2007-10-10 14:08:43 -05:00
Simo Sorce
f0c1d08d50 r15932: Remove per request creds
They have never benn used and make little sense too imo
2007-10-10 14:08:41 -05:00
Simo Sorce
7d65105e88 r15927: Optimize ldb module traverse while keeping the API intact.
I was sick of jumping inot each module for each request,
even the ones not handle by that module.
2007-10-10 14:08:41 -05:00
Simo Sorce
099d873ea5 r15761: Fix-as-you-go ...
Testing various async paths and uncovering bugs
2007-10-10 14:08:15 -05:00
Simo Sorce
0bc3caa918 r14391: rdn_name -> async 2007-10-10 13:57:18 -05:00
Simo Sorce
b112eb774f r14364: operational -> async (untested) 2007-10-10 13:57:15 -05:00
Jelmer Vernooij
52a2356505 r13786: [merge] Add registration functions for LDB modules
Applications that use LDB modules will now have to run ldb_global_init()
before they can use LDB.

The next step will be adding support for loading LDB modules from .so
files. This will also allow us to use one LDB without difference between the
standalone and the Samba-specific build
2007-10-10 13:52:11 -05:00
Andrew Tridgell
68c9ac38c7 r13700: added highestCommittedUSN, uSNChanged and uSNCreated support, using
the @BASEINFO sequenceNumber

(simo, I changed the function pointer to a structure element as you
preferred)
2007-10-10 13:52:06 -05:00
Andrew Bartlett
424df1bb36 r13616: Add new ldb functions: ldb_msg_add_steal_string() and
ldb_msg_add_steal_value().

These try to maintain the talloc heirachy, which must be correct
otherwise talloc_steal operations of entire attribute lists fails.

This fixes the currentTime value, found by using Microsoft's dcdiag
tool (before this commit, it pointed to invalid memory, due to the
changes in -r 13606)

Andrew Bartlett
2007-10-10 13:51:59 -05:00
Stefan Metzmacher
380938e97f r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later.

metze
2007-10-10 13:50:03 -05:00
Simo Sorce
5e8b365fa2 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.
2007-10-10 13:49:48 -05:00
Simo Sorce
77125feaff 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.
2007-10-10 13:49:47 -05:00
Jelmer Vernooij
c297c93faf r12658: Couple of fixes related to shared module builds. 2007-10-10 13:49:35 -05:00
Andrew Tridgell
b1d38153b8 r11981: we should allocate request specific memory in ldb modules off the
request strucutre. It will take a while for this to happen everywhere.
2007-10-10 13:46:54 -05:00
Andrew Tridgell
b8d4afb14a r11958: - fixed memory leaks in the ldb_result handling in ldb operations
- removed an unnecessary level of pointer in ldb_search structure
2007-10-10 13:46:51 -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
197e8a27f0 r10954: added support for canonicalName in the operational module, using the
dn->canonicalName function abartlet just committed
2007-10-10 13:39:46 -05:00
Andrew Tridgell
e9e4d81b69 r10918: - fixed standalone ldb build
- added note about allowedAttributesEffective (will be needed for mmc)

- fixed some more ldb warnings
2007-10-10 13:39:43 -05:00
Andrew Tridgell
9c914542cc r10917: copy the element name in a ldb_msg_rename_attr() and ldb_msg_copy_attr() to ensure
that callers (like the ldap server) can talloc_steal the name
2007-10-10 13:39:42 -05:00
Andrew Tridgell
61e8b01022 r10916: - finished the 'operational' ldb module
- removed the timestamps module, replacing it with the operational module

- added a ldb_msg_copy_shallow() function which should be used when a module
  wants to add new elements to a message on add/modify. This is needed
  because the caller might be using a constant structure, or may want to
  re-use the structure again

- enabled the UTC time attribute syntaxes in the operational module
2007-10-10 13:39:42 -05:00
Andrew Tridgell
f6818daecc r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
2007-10-10 13:39:41 -05:00