diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-02-17 18:41:00 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-02-19 06:08:19 +0100 |
commit | 3c51e18a0cd1cb4b54cd29e312abd7cc2c0fbc98 (patch) | |
tree | f298091e133e38e078d08f72c6f9280e0c186971 /source4/scripting | |
parent | 396df64ef6f2c66c35989ecda3e564d5578fe9f3 (diff) | |
download | samba-3c51e18a0cd1cb4b54cd29e312abd7cc2c0fbc98.tar.gz samba-3c51e18a0cd1cb4b54cd29e312abd7cc2c0fbc98.tar.bz2 samba-3c51e18a0cd1cb4b54cd29e312abd7cc2c0fbc98.zip |
samba_upgradeprovision: Do not update privileges.ldb any more (unchanged since 2009)
This update was only a total oblitoration of the existing database
and not a merge, and the shutil.copy would both disregard and break
locks on the database that are held at this point.
Andrew Bartlett
Reviewed-by: Matthieu Patou <mat@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/bin/samba_upgradeprovision | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source4/scripting/bin/samba_upgradeprovision b/source4/scripting/bin/samba_upgradeprovision index b249b4e32d..2ed6186a84 100755 --- a/source4/scripting/bin/samba_upgradeprovision +++ b/source4/scripting/bin/samba_upgradeprovision @@ -1496,18 +1496,6 @@ def simple_update_basesamdb(newpaths, paths, names): os.remove(configldb) -def update_privilege(ref_private_path, cur_private_path): - """Update the privilege database - - :param ref_private_path: Path to the private directory of the reference - provision. - :param cur_private_path: Path to the private directory of the current - (and to be updated) provision.""" - message(SIMPLE, "Copy privilege") - shutil.copy(os.path.join(ref_private_path, "privilege.ldb"), - os.path.join(cur_private_path, "privilege.ldb")) - - def update_samdb(ref_samdb, samdb, names, provisionUSNs, schema, prereloadfunc): """Upgrade the SAM DB contents for all the provision partitions @@ -1594,8 +1582,9 @@ def sync_calculated_attributes(samdb, names): # 6) get reference provision paths # 7) open reference provision ldbs # 8) setup helpers data that will help the update process -# 9) update the privilege ldb by copying the one of referecence provision to -# the current provision +# 9) (SKIPPED) we no longer update the privilege ldb by copying the one of referecence provision to +# the current provision, because a shutil.copy would break the transaction locks both databases are under +# 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 @@ -1817,8 +1806,7 @@ if __name__ == '__main__': populate_links(new_ldbs.sam, names.schemadn) # List of attribute with ASN DN synthax) populate_dnsyntax(new_ldbs.sam, names.schemadn) - # 9) - update_privilege(newpaths.private_dir, paths.private_dir) + # 9) (now skipped, was copy of privileges.ldb) # 10) oem = getOEMInfo(ldbs.sam, str(names.rootdn)) # Do some modification on sam.ldb |