summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-02-16 21:58:57 +1100
committerStefan Metzmacher <metze@samba.org>2013-03-04 08:33:04 +0100
commit787a6aacc3003731784b29fd92c683036c8730a7 (patch)
treeaa52f1e985c37ce271fe9f2a8e9539048f5846ad /source4/scripting
parent9d6af4938f7bc80b10202d7055c2c32a483bbb5f (diff)
downloadsamba-787a6aacc3003731784b29fd92c683036c8730a7.tar.gz
samba-787a6aacc3003731784b29fd92c683036c8730a7.tar.bz2
samba-787a6aacc3003731784b29fd92c683036c8730a7.zip
samba_upgradeprovision: Remove auto-detection of pre-alpha9 databases
These are incredibly rare, and administrators running such databases not only ask the Samba Team for help personally, they can read --help. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_upgradeprovision11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/scripting/bin/samba_upgradeprovision b/source4/scripting/bin/samba_upgradeprovision
index 25c3ac2501..36f6a60068 100755
--- a/source4/scripting/bin/samba_upgradeprovision
+++ b/source4/scripting/bin/samba_upgradeprovision
@@ -191,6 +191,8 @@ parser.add_option("--db_backup_only", action="store_true",
help="Do the backup of the database in the provision, skip the sysvol / netlogon shares")
parser.add_option("--full", action="store_true",
help="Perform full upgrade of the samdb (schema, configuration, new objects, ...")
+parser.add_option("--very-old-pre-alpha9", action="store_true",
+ help="Perform additional forced SD resets required for a database from before Samba 4.0.0alpha9.")
opts = parser.parse_args()[0]
@@ -1591,9 +1593,8 @@ def sync_calculated_attributes(samdb, names):
# and this database has not changed between 2009 and Samba 4.0.3 in Feb 2013 (at least)
# 10)get the oemInfo field, this field contains information about the different
# provision that have been done
-# 11)Depending on whether oemInfo has the string "alpha9" or alphaxx (x as an
-# integer) or none of this the following things are done
-# A) When alpha9 or alphaxx is present
+# 11)Depending on if the --very-old-pre-alpha9 flag is set the following things are done
+# A) When alpha9 or alphaxx not specified (default)
# The base sam.ldb file is updated by looking at the difference between
# referrence one and the current one. Everything is copied with the
# exception of lastProvisionUSN attributes.
@@ -1819,7 +1820,7 @@ if __name__ == '__main__':
deltaattr = None
# 11)
message(GUESS, oem)
- if oem is None or hasATProvision(ldbs.sam) or re.match(".*alpha((9)|(\d\d+)).*", str(oem)):
+ if oem is None or hasATProvision(ldbs.sam) or not opts.very_old_pre_alpha9:
# 11) A
# Starting from alpha9 we can consider that the structure is quite ok
# and that we should do only dela
@@ -1918,7 +1919,7 @@ if __name__ == '__main__':
# 16) SD should be created with admin but as some previous acl were so wrong
# that admin can't modify them we have first to recreate them with the good
# form but with system account and then give the ownership to admin ...
- if str(oem) != "" and not re.match(r'.*alpha(9|\d\d+)', str(oem)):
+ if opts.very_old_pre_alpha9:
message(SIMPLE, "Fixing very old provision SD")
rebuild_sd(ldbs.sam, names)