• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..25-Aug-201424

addpartial-overlay.cH A D07-Feb-201212.9 KiB

COPYRIGHTH A D08-May-2009370

LICENSEH A D08-May-20092.2 KiB

MakefileH A D07-Feb-2012318

READMEH A D07-Feb-20123.1 KiB

README

1addpartial Overlay README
2
3DESCRIPTION
4    This package contains an OpenLDAP overlay called "addpartial" that 
5    intercepts add requests, determines if the entry exists, determines what 
6    attributes, if any, have changed, and modifies those attributes.  If the
7    entry does not exist, the add request falls through and proceeds normally.
8    If the entry exists but no changes have been detected, the client receives
9    LDAP_SUCCESS (I suppose it is debatable what to do in this case, but this is
10    the most clean for my use.  The LDAP_SUCCESS lets me know that the entry I
11    sent slapd == the entry already in my slapd DB.  Perhaps this behavior
12    should be configurable in the future).
13
14    When a change is found, the addpartial overlay will replace all values for
15    the attribute (if an attribute does not exist in the new entry but exists
16    in the entry in the slapd DB, a replace will be done with an empty list of
17    values).
18
19    Once a modify takes place, the syncprov overlay will properly process the
20    change, provided that addpartial is the first overlay to run.  Please see
21    the CAVEATS for more specifics about this.
22
23    The addpartial overlay makes it easy to replicate full entries to a slapd 
24    instance without worrying about the differences between entries or even if
25    the entry exists.  Using ldapadd to add entries, the addpartial overlay can
26    compare about 500 records per second.  The intent of the addpartial overlay
27    is to make it easy to replicate records from a source that is not an LDAP
28    instance, such as a database.  The overlay is also useful in places where it
29    is easier to create full entries rather than comparing an entry with an
30    entry that must be retrieved (with ldapsearch or similar) from an existing
31    slapd DB to find changes. 
32
33    The addpartial overlay has been used in production since August 2004 and has
34    processed millions of records without incident.
35
36BUILDING
37    A Makefile is included, please set your OPENLDAP_SRC directory properly.
38
39INSTALLATION
40    After compiling the addpartial overlay, add the following to your 
41    slapd.conf:
42
43    ### slapd.conf
44    ...
45    moduleload /path/to/addpartial-overlay.so
46    ...
47    # after database directive...
48    # this overlay should be the last overlay in the config file to ensure that
49    # it properly intercepts the add request
50    overlay addpartial
51    ...
52    ### end slapd.conf
53
54CAVEATS
55    - In order to ensure that addpartial does what it needs to do, it should be
56      the last overlay configured so it will run before the other overlays.
57      This is especially important if you are using syncrepl, as the modify that
58      addpartial does will muck with the locking that takes place in the
59      syncprov overlay.
60
61---
62Copyright 2004-2011 The OpenLDAP Foundation.
63Portions Copyright (C) Virginia Tech, David Hawes.
64All rights reserved.
65
66Redistribution and use in source and binary forms, with or without
67modification, are permitted only as authorized by the OpenLDAP
68Public License.
69
70A copy of this license is available in file LICENSE in the
71top-level directory of the distribution or, alternatively, at
72http://www.OpenLDAP.org/license.html.
73