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

41 Commits

Author SHA1 Message Date
Andrew Bartlett
c8d1ab3084 r25941: Use samdb_relative_path() (new function in samdb.c) in the partitions
module.

Andrew Bartlett
2007-12-21 05:45:11 +01:00
Andrew Bartlett
e8cbac1a46 r25710: Finally fix subtree renames. Untested code is broken code and in this
case an oddity of the javascript caused the test to 'pass'.

For the same oddity, we have a failure in ldb's handling of spaces in
DNs.  We need to resolve that too.

Andrew Bartlett
2007-12-21 05:43:24 +01:00
Andrew Bartlett
cea496d216 r25701: Clarify comment 2007-12-21 05:43:20 +01:00
Jelmer Vernooij
08bb1ef643 r25000: Fix some more C++ compatibility warnings. 2007-10-10 15:05:27 -05:00
Andrew Bartlett
62320616ff r24731: Remove unused code - if we hit these error conditions, then we are
dead anyway, and a segfault would leave us with more infomation.

Andrew Bartlett
2007-10-10 15:03:00 -05:00
Andrew Bartlett
d0595e7a3d r24690: Further fix to bug 4919: Ensure we don't supply a NULL URL argument to
ldb_connect_backend().

Andrew Bartlett
2007-10-10 15:02:45 -05:00
Andrew Bartlett
ba82197e30 r24655: Fix bug 4919 reported by Matthias Wallnöfer <mwallnoefer@yahoo.de>:
> When you change to the SAMBA private directory on a shell (default
> /usr/local/samba/private) and start there for example ldbedit with the sam.ldb,
> the application crashes if you don't put the "./" before the filename.

I've adapted Matthias's patch.

Andrew Bartlett
2007-10-10 15:02:33 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Andrew Bartlett
3f3da9c471 r23762: Fix DN renames over LDAP, and instrument the partition module. Add a
test to prove the behaviour of LDAP renames etc.

Fix LDB to return correct error code when failing to rename one DN
onto another.

Andrew Bartlett
2007-10-10 14:59:11 -05:00
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Andrew Bartlett
c0fd6f6339 r22557: Simo has long bugged me that the paths in the sam.ldb partitions were
not relative to the location of the sam.ldb, but instead
lp_private_dir().

This fixes that issue.

Andrew Bartlett
2007-10-10 14:51:43 -05:00
Andrew Bartlett
eef710668f r21806: I've been working over the last week to fix up the LDAP backend for
Samba4.  This only broke on global catalog queries, which turned out to
be due to changes in the partitions module that metze needed for his
DRSUAPI work.

I've reworked partitions.c to always include the 'problematic' control,
and therefore demonstrated that this is the issue.  This ensures
consistency, and should help with finding issues like this in future.

As this control (DSDB_CONTROL_CURRENT_PARTITION_OID) is not intended to
be linearised, I've added logic to allow it to be skipped when creating
network packets.

I've likewise make our LDAP server skip unknown controls, when marked
'not critical' on it's input, rather than just dropping the entire
request.  I need some help to generate a correct error packet when it is
marked critical.

Further work could perhaps be to have the ldap_encode routine return a
textual description of what failed to encode, as that would have saved
me a lot of time...

Andrew Bartlett
2007-10-10 14:49:29 -05:00
Andrew Bartlett
2b3df7f38d r21496: A number of ldb control and LDAP changes, surrounding the
'phantom_root' flag in the search_options control

- Add in support for LDB controls to the js layer
- Test the behaviour
- Implement support for the 'phantom_root' flag in the partitions module
- Make the LDAP server set the 'phantom_root' flag in the search_options control
  - This replaces the global_catalog flag passed down as an opaque pointer
- Rework the string-format control parsing function into
  ldb_parse_control_strings(), returning errors by ldb_errorstring()
  method, rather than with printf to stderr
- Rework some of the ldb_control handling logic

Andrew Bartlett
2007-10-10 14:48:44 -05:00
Stefan Metzmacher
b3fce383d3 r20855: pass the DSDB_CONTROL_CURRENT_PARTITION_OID control also for the
send_all case

metze
2007-10-10 14:43:40 -05:00
Stefan Metzmacher
06a46b1db4 r20853: attach the DSDB_CONTROL_CURRENT_PARTITION_OID control when requests
are passed to a specific partition

metze
2007-10-10 14:43:40 -05:00
Stefan Metzmacher
0d75cca6f3 r20849: first step to move away from using find_backend() and use find_partition()
instead

metze
2007-10-10 14:43:39 -05:00
Stefan Metzmacher
3d313f08c7 r20847: - split some code out into a new function find_partition()
- make all functions static

metze
2007-10-10 14:43:39 -05:00
Stefan Metzmacher
684eee52e8 r20826: make the dsdb_control_current_partition struct public and allocate an oid for the
control

metze
2007-10-10 14:43:37 -05:00
Stefan Metzmacher
e5de40f8c2 r20809: rename struct partition into struct dsdb_control_current_partition
we'll soon pass this down as DSDB_CONTROL_CURRENT_PARTITION_OID control
so that the repl_meta_data module knows where to update the replUpToDateVector
attribute

metze
2007-10-10 14:43:34 -05:00
Stefan Metzmacher
2e79863d54 r20729: add a version number to struct dsdb_extended_replicated_objects
metze
2007-10-10 14:40:33 -05:00
Stefan Metzmacher
88051a82c4 r20679: make the init_handle stuff a bit easier and get rid of really ugly talloc_get_type()
usage

simo: if you change more modules, please include also this change

metze
2007-10-10 14:40:20 -05:00
Stefan Metzmacher
0ed53c6d0f r20599: - forward extended operations in the partitions module
- by default the operations goes to all partitions
- but some wellkown ones will go to just one partition
  (DSDB_EXTENDED_REPLICATED_OBJECTS_OID for now)

I'll soon change the partitions module so that it'll attach a
DSDB_CONTROL_PARTITION_CONTEXT_OID control to give
the repl_meta_data or other partition specific modules a chance to
to know for which partition it should work.

metze
2007-10-10 14:37:12 -05:00
Simo Sorce
3a662a2d98 r19869: fix memleaks 2007-10-10 14:28:28 -05:00
Simo Sorce
a580c871d3 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.
2007-10-10 14:28:22 -05:00
Simo Sorce
889fb983ba r19531: Make struct ldb_dn opaque and local to ldb_dn.c 2007-10-10 14:24:44 -05:00
Stefan Metzmacher
ed195999c0 r18945: fix compiler warnings and end-of-non-void function bugs
metze
2007-10-10 14:20:23 -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 Bartlett
bc58792b71 r18495: More work on the LDAP backend (which now passes a lot of our tests!)
This adds a list of attributes that are in our wildcard seaches, but
the remote server requires to be explicitly listed.  This also cleans
up the handling of wildcards in ldb_map to be more consistant.

Also fix the partitions module to rebase the search, if on the GC
port, we do a subtree search.  (Otherwise backends can rightly
complain that the search is not in their scope).

Andrew Bartlett
2007-10-10 14:18:38 -05:00
Andrew Bartlett
420d1920a6 r17703: Fixes to enable the entryUUID module to work for it's objectClass ->
OID mappings.

The key point is to 'enable' the partitions in the partitions module
before the init is complete.  That way, the modules can perform
searches that use partitions.

Andrew Bartlett
2007-10-10 14:16:28 -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
Andrew Bartlett
c016db2187 r17474: Allow the partitions module to load modules for specific backends.
Andrew Bartlett
2007-10-10 14:15:27 -05:00
Andrew Bartlett
be51b72408 r17303: More testing results: Don't try and call a NULL callback, and use the
correct parameter, as this is called for more than just 'add'.

Andrew Bartlett
2007-10-10 14:15:09 -05:00
Andrew Bartlett
ad463c1a52 r17302: Testing!
This confirms that records are replicated into the correct databases,
and that the case insensitive flags really work.

Andrew Bartlett
2007-10-10 14:15:08 -05:00
Andrew Bartlett
90c07b8801 r17299: Improve the partition module to replicate attribute records into all
partitions.

Test that we do that correctly.

Andrew Bartlett
2007-10-10 14:15:08 -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
0a354a1dde r17103: Big updates to the not-yet-enabled partitions module. It now services
the Global Catalog port 'correctly' (in a very simple sense) in that
it should be no worse than what we had before.

We now combine partitions together to search over the whole tree, when
we are marked as 'global catalog'.

Andrew Bartlett
2007-10-10 14:10:13 -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
Andrew Bartlett
eae232530c r16933: Sort the partitions in order from most, to least specific.
Remember to perform operations on the base database as well.

Andrew Bartlett
2007-10-10 14:10:01 -05:00
Andrew Bartlett
2728b60dfa r16914: Add more tests for the partition module.
Andrew Bartlett
2007-10-10 14:09:59 -05:00
Andrew Bartlett
b49a4fbb57 r16264: Add, but do not yet enable, the partitions module.
This required changes to the rootDSE module, to allow registration of
partitions.  In doing so I renamed the 'register' operation to
'register_control' and 'register_partition', which changed a few more
modules.

Due to the behaviour of certain LDAP servers, we create the baseDN
entry in two parts: Firstly, we allow the admin to export a simple
LDIF file to add to their server.  Then we perform a modify to add the
remaining attributes.

To delete all users in partitions, we must now search and delete all
objects in the partition, rather than a simple search from the root.
Against LDAP, this might not delete all objects, so we allow this to
fail.

In testing, we found that the 'Domain Controllers' container was
misnamed, and should be 'CN=', rather than 'OU='.

To avoid the Templates being found in default searches, they have been
moved to CN=Templates from CN=Templates,${BASEDN}.

Andrew Bartlett
2007-10-10 14:09:09 -05:00