1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

21022 Commits

Author SHA1 Message Date
Andrew Tridgell
e3cf818c27 s4-drs: sort linked attributes
See MS-DRSR section 4.1.10.5.17 for a description of the sorting
comparison function
2010-01-02 08:16:55 +11:00
Andrew Tridgell
d48237d547 s4-drs: re-resolve the DN in linked attribute processing
w2k8-r2 sometimes sends the DN with an old target
2010-01-02 08:16:54 +11:00
Andrew Tridgell
5dd6e089f1 s4-drs: use dsdb_module_rename()
Use the new dsdb_module_rename() for DRS rename handling, instead of
ldb_rename(). This stops us going to the top of the module stack on a
rename.
2010-01-02 08:16:54 +11:00
Andrew Tridgell
38160deac4 s4-drs: use dsdb linked attribute parse functions
This makes the code considerably more readable
2010-01-02 08:16:54 +11:00
Andrew Tridgell
5e52c7149f s4-dsdb: added parse functions for DRS linked attribute blobs 2010-01-02 08:16:54 +11:00
Andrew Tridgell
a81dd03917 s4-drs: set flag to indicate that we do support linked attributes 2010-01-02 08:16:54 +11:00
Andrew Tridgell
36f8ece9de s4-ldb: show the error code as well as errstr
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:54 +11:00
Andrew Tridgell
db3f0e8ec1 s4-dsdb: fixed valgrind error in replmd modify
We are using the values from a search result, so we need to steal them
onto the msg before we free the search results

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:54 +11:00
Andrew Tridgell
9f053d43de s4-drs: don't try to remove backlinks directly
backlinks need to be removed as a side effect of removing the forward
link

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
0bf7f95273 s4-drs: isRecycled only exists in FL W2K8-R2
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
530503290d s4-drs: use DSDB_FLAG_OWN_MODULE
We need DRS driven replication changes to update replPropertyMetaData,
so it needs to call into the repl_meta_data module logic

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
9572535940 s4-drs: update comment to refect only forward link in this fn
This function only update forward links

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
5b31cb20dd s4-drs: fixed typo for uSNCreated
This broke DRS replication from samba to windows

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
7a39340c8e s4-drs: use dsdb_module_guid_by_dn()
We should not be going to the top of the module stack
2010-01-02 08:16:53 +11:00
Andrew Tridgell
e3054ce0fe s4-drs: cope better with NULL GUIDS from DRS
It is valid to get a NULL GUID over DRS for a deleted forward link. We
need to match by DN if possible when seeing if we should update an
existing link.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
2e114484e5 s4-drs: give an error message in repl_meta_data if we don't get a partition control 2010-01-02 08:16:53 +11:00
Andrew Tridgell
0d5d7f5847 s4-drs: treat a zero GUID as not present in replmd_add_fix_la
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:53 +11:00
Andrew Tridgell
0c2afdd5a9 s4-drs: update highwatermark after successfully encoding the object 2010-01-02 08:16:52 +11:00
Andrew Tridgell
ff6dd4a67f s4-drs: send all linked attributes at the end of a replication cycle
This ensures that a link is not seen before the object it points to
2010-01-02 08:16:52 +11:00
Andrew Tridgell
5bf257fa9b s4-drs: use the extended linearized form for DRS replication
We were sending zero GUIDs. Not good!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:52 +11:00
Andrew Tridgell
7653f56bd4 s4-drs: implemented sorting functions based on replication flags
I think we probably have more work to do on the sort order, but this
brings us a bit closer.
2010-01-02 08:16:52 +11:00
Andrew Tridgell
701148bbe9 s4-drs: we are doing the sorting for getncchanges in the app code now
the sorting is quite delicate, and easier to get right in the
getncchanges code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:52 +11:00
Andrew Tridgell
cb00e443a3 s4-drs: give a reason when an AddEntry commit fails
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:52 +11:00
Andrew Tridgell
9f02898080 s4-schema: don't fill in the extended DN with a zero GUID
sometimes windows sends us a zero GUID in a DRS DN.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:52 +11:00
Andrew Tridgell
d4853fed00 sd-schema: order DRS classes on the wire in reverse order
windows sends objectclasses in DRS in the opposite order to what LDAP
uses
2010-01-02 08:16:52 +11:00
Andrew Tridgell
ca5c3a0a02 s4-dsdb: added DSDB_FLAG_OWN_MODULE
This allows you to call dsdb_module_*() functions while including the
current module in the module stack to be used

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:52 +11:00
Andrew Tridgell
e1ffcfc783 s4-ldb: added ldb_module_get_ops()
This is needed to support DSDB_FLAG_OWN_MODULE

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:51 +11:00
Andrew Tridgell
dd33a22f1d s4-dsdb: use a common method for finding a link pair
Use ^1 everywhere, to ensure it works for both forward and backward
links
2010-01-02 08:16:51 +11:00
Andrew Tridgell
340d7e807b s4-drs: fixed the UDV return in getncchanges
We should overwrite an existing entry if found
2010-01-02 08:16:51 +11:00
Andrew Tridgell
bcc952d19d s4-drs: some useful debugging options for getncchanges
Added two debugging parametric options

  drs:max object sync = 
  drs:extra filter =
2010-01-02 08:16:51 +11:00
Andrew Tridgell
bf8ccd21f1 s4-dsdb: fill in the correct version number of links that come over DRS 2010-01-02 08:16:51 +11:00
Andrew Tridgell
5dcb903f26 s4-dsdb: move checking for single valued links to samba modules
This uses the RELAX control and checking of single valued attributes
in ldb modules to avoid problems with multi-valued links where all
values but one are deleted
2010-01-02 08:16:51 +11:00
Andrew Tridgell
3c1259f10e s4-dsdb: added dsdb_check_single_valued_link()
This is used in conjunction with the RELAX control, to check for
violations of single value rules for linked attributes
2010-01-02 08:16:51 +11:00
Andrew Tridgell
225bcfa4e6 s4-drs: handle mixtures of old and new style links in getncchanges
We need to send non-upgraded links using the old format
2010-01-02 08:16:51 +11:00
Andrew Tridgell
64802c5e27 s4-dsdb: added dsdb_dn_is_upgraded_link_val()
This is used to detect if a link has been stored in the w2k3 extended
format
2010-01-02 08:16:51 +11:00
Andrew Tridgell
b34db0840d s4-ldb: use the RELAX control to disable single value checking on replace
When using w2k3 linked attributes we are allowed to have multiple
values on a single valued attribute. This happens when the other
values are deleted.

Setting the RELAX control tell the ldb-tdb backend to not check for
this on replace, which means the caller has to check for single valued
violations.
2010-01-02 08:16:51 +11:00
Andrew Tridgell
26ec526d02 s4-dsdb: auto-upgrade w2k formatted linked attributes when modified
When any value of a w2k formatted linked attribute is modified,
upgrade the links.
2010-01-02 08:16:50 +11:00
Andrew Tridgell
fde3f64373 s4-drs: added linked attribute replication to getncchanges 2010-01-02 08:16:50 +11:00
Andrew Tridgell
beba977213 s4-dsdb: ask for REVEAL_INTERNALS in getncchanges
We need this for the linked attribute meta data
2010-01-02 08:16:50 +11:00
Andrew Tridgell
809bcfca3d s4-dsdb: minor cleanup in DRS replicated objects code 2010-01-02 08:16:50 +11:00
Andrew Tridgell
4dbcab45f2 s4-dsdb: store full meta data from DRS for linked attributes
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Andrew Tridgell
312ef9df3c s4-dsdb: add REVEAL_INTERNALS in the search for linked_attributes
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Andrew Tridgell
b1db66a501 s4-dsdb: allow the component name to be specified in dsdb_get_extended_dn_guid()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Andrew Tridgell
f1b6484232 s4-dsdb: split RMD_USN into RMD_LOCAL_USN and RMD_ORIGINATING_USN
We need a separate RMD_LOCAL_USN to allow us to tell what attributes
need to be sent in a getncchanges request. Thanks to Metze for
pointing this out.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Andrew Tridgell
e4a6f5c8b8 s4-dsdb: handle links with no backlinks in replmd_delete 2010-01-02 08:16:50 +11:00
Andrew Tridgell
5eefff915e s4-dsdb: simplify the linked_attributes module
The linked_attributes module only has to deal with renames now, as
other linked attribute updates happen in repl_meta_data. This allows
it to be much simpler.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:49 +11:00
Andrew Tridgell
e9699e9cb9 s4-dsdb: do the rename after the modify in replmd_delete
This makes updating the links a bit easier
2010-01-02 08:16:49 +11:00
Andrew Tridgell
2b5cd3dba2 s4-dsdb: some backlinks can be processed immediately
backlinks in add and delete operations can be processed immediately,
rather than at the end of a transaction. This can save on backlink
list processing time.
2010-01-02 08:16:49 +11:00
Andrew Tridgell
3fe9244796 s4-dsdb: remove linked_attributes_add
This is now handled in the repl_meta_data module
2010-01-02 08:16:49 +11:00
Andrew Tridgell
9e96ae8ddc s4-dsdb: add linked attributes meta_data handling to replmd_add
This also handles the backlink creation that was previously in the
linked_attributes module

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:49 +11:00