1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source4/dsdb
Garming Sam 2650e9258b schema: Allow schemaUpdateNow to refresh schema during a transaction
When we upgrade a schema from 2008R2 to 2012R2, we want to apply all the
changes in a single transaction - if we can't apply all the updates then
we don't want to be left with a schema halfway in between the two.

However, as we apply each LDIF update, we also want to refresh the
schema. There are 2 reasons for this:
1. The adprep .LDIF files provided by Microsoft have some writes to
schemaUpdateNow in them.
2. Microsoft uses attribute OIDs in their adprep .LDIF files, which
Samba doesn't handle so well. However, we can replace the OIDs with the
attribute's ldapDisplayName and they work fine. But to do this, we need
to query the schema to map the OID to attribute name. And to query the
schema successfully, the schema needs to be refreshed after the new
attribute object has been added.

Basically this patch avoids bailing out during the dsdb_schema_refresh()
if we are writing schemaUpdateNow as part of a larger transaction.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-12-14 08:20:15 +01:00
..
common drs: Add basic GET_TGT support 2017-09-18 05:51:24 +02:00
dns source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
gpo gpoupdate: Move closer to 80 columns 2017-11-20 21:41:15 +01:00
kcc source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
repl schema: Make writing indices flag an enum for a new state 2017-11-24 01:13:14 +01:00
samdb schema: Allow schemaUpdateNow to refresh schema during a transaction 2017-12-14 08:20:15 +01:00
schema source4 dsdb: Allow duplicate non local objectSIDs 2017-12-10 00:47:29 +01:00
tests/python linked attribute tests: correct add_all_at_once test 2017-10-26 05:36:11 +02:00
pydsdb.c flags.h: Introduce the 2016 function level constant 2017-12-14 08:20:14 +01:00
samdb.pc.in s4-pkgconfig: add @LIB_RPATH@ to our link flags 2010-12-08 12:46:00 +01:00
wscript_build gpo: enable gpo update with addition to build system 2017-11-20 21:41:14 +01:00