summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2009-11-24 17:02:59 +0300
committerAndrew Bartlett <abartlet@samba.org>2009-11-25 13:33:52 +1100
commit604c291bdd4aae8e9be734967db3a0a64c2e0f38 (patch)
treed4af45a6a1ca42f200210c72bdf197afa7737192 /source4
parent1ad23832cfafd46f83ac406006ff175900b81d00 (diff)
downloadsamba-604c291bdd4aae8e9be734967db3a0a64c2e0f38.tar.gz
samba-604c291bdd4aae8e9be734967db3a0a64c2e0f38.tar.bz2
samba-604c291bdd4aae8e9be734967db3a0a64c2e0f38.zip
s4:upgradeschema.py Cleanup
- remove some useless comments - remove hardcoded paths (commit message clarified by Andrew Bartlett) Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/bin/upgradeschema.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/scripting/bin/upgradeschema.py b/source4/scripting/bin/upgradeschema.py
index cf8262aef9..471a726961 100755
--- a/source4/scripting/bin/upgradeschema.py
+++ b/source4/scripting/bin/upgradeschema.py
@@ -129,7 +129,6 @@ setup_dir = opts.setupdir
if setup_dir is None:
setup_dir = find_setup_dir()
-setup_dir = "/usr/local/src/samba4/source4/setup"
session = system_session()
# Create an array of backlinked attributes
@@ -348,7 +347,6 @@ def handle_security_desc(ischema,att,msgElt,hashallSD,old,new):
# if it has a certain value or if it's for a certain object or
# a class of object.
# It can be also if we want to do a merge of value instead of a simple replace
-
def handle_special_case(att,delta,new,old,ischema):
flag = delta.get(att).flags()
if (att == "gPLink" or att == "gPCFileSysPath") and flag == ldb.FLAG_MOD_REPLACE and str(new[0].dn).lower() == str(old[0].dn).lower():
@@ -449,6 +447,7 @@ def update_secrets(newpaths,paths,creds,session):
delta.dn = res2[0].dn
sam_ldb.modify(delta)
+
# Check difference between the current provision and the reference provision.
# It looks for all object which base DN is name if ischema is false then scan is done in
# cross partition mode.
@@ -510,7 +509,6 @@ def check_diff_name(newpaths,paths,creds,session,basedn,names,ischema):
print "There are %d missing objects"%(len(listMissing))
for dn in listMissing:
res = newsam_ldb.search(expression="dn=%s"%(str(dn)),base=basedn, scope=SCOPE_SUBTREE,controls=["search_options:1:2"])
- #print >>sys.stderr, "@@@"+str(dn)
delta = sam_ldb.msg_diff(empty,res[0])
for att in hashAttrNotCopied.keys():
delta.remove(att)
@@ -642,8 +640,6 @@ def rmall(topdir):
# For each partition check the differences
def check_diff(newpaths,paths,creds,session,names):
- #for name in [str(names.schemadn), str(names.configdn), str(names.rootdn)] :
- #for name in [str(names.configdn)] :
print "Copy samdb"
shutil.copy(newpaths.samdb,paths.samdb)
@@ -685,7 +681,6 @@ names = guess_names_from_current_provision(creds,session,paths)
print_names(names)
# With all this information let's create a fresh new provision used as reference
provisiondir = newprovision(names,setup_dir,creds,session,smbconf)
-#provisiondir = "/home/mat/provision12962"
# Get file paths of this new provision
newpaths = get_paths(targetdir=provisiondir)
populate_backlink(newpaths,creds,session,names.schemadn)