[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-213-gc87a8ba

Jelmer Vernooij jelmer at samba.org
Fri Aug 1 18:19:50 GMT 2008


The branch, v4-0-test has been updated
       via  c87a8ba1fef1ba508ad6527d0bae4bcdd5b3cb69 (commit)
       via  a461118f3b668779f907c4d77cebe1e76fa4e39f (commit)
       via  20d40e31942f96ca9d077e57c6dd4c1d38f79b4b (commit)
      from  10db07c69addce6e90851fb55738d5f9e142946b (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit c87a8ba1fef1ba508ad6527d0bae4bcdd5b3cb69
Merge: a461118f3b668779f907c4d77cebe1e76fa4e39f 10db07c69addce6e90851fb55738d5f9e142946b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Aug 1 20:17:56 2008 +0200

    Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into manpage

commit a461118f3b668779f907c4d77cebe1e76fa4e39f
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Aug 1 20:17:29 2008 +0200

    Fix some forgotten substitute variables in provision, add check to prevent this sort of regression in the future.

commit 20d40e31942f96ca9d077e57c6dd4c1d38f79b4b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Jul 30 13:29:29 2008 +0200

    Be more pythonic.

-----------------------------------------------------------------------

Summary of changes:
 source/scripting/bin/mymachinepw           |   12 +++++-------
 source/scripting/python/samba/provision.py |    2 ++
 2 files changed, 7 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/scripting/bin/mymachinepw b/source/scripting/bin/mymachinepw
index 49a4245..3a843b5 100755
--- a/source/scripting/bin/mymachinepw
+++ b/source/scripting/bin/mymachinepw
@@ -40,8 +40,7 @@ if not loaded:
 path=conf.get("private dir") + "/secrets.ldb"
 netbios=conf.get("netbios name")
 
-secrets = ldb.Ldb()
-secrets.connect(path)
+secrets = ldb.Ldb(path)
 
 search = "(&(objectclass=primaryDomain)(samaccountname=" + \
 	  netbios + "$))"
@@ -49,13 +48,12 @@ search = "(&(objectclass=primaryDomain)(samaccountname=" + \
 msg = secrets.search(expression=search, attrs=['secret'])
 
 if not msg:
-    error =  "Error:\n"
-    error += "Password for host[" + netbios + "] not found in path[" + path + "].\n"
-    error += "You may want to pass the smb.conf location via the -s option."
-    print error
+    print "Error:"
+    print "Password for host[%s] not found in path[%s]." % (netbios, path)
+    print "You may want to pass the smb.conf location via the -s option."
     exit(1)
 
-password=msg[0]['secret'][0];
+password=msg[0]['secret'][0]
 
 print(password)
 exit(0)
diff --git a/source/scripting/python/samba/provision.py b/source/scripting/python/samba/provision.py
index 441d662..6b1fd33 100644
--- a/source/scripting/python/samba/provision.py
+++ b/source/scripting/python/samba/provision.py
@@ -1435,6 +1435,7 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename):
     schema_data = open(setup_path("schema.ldif"), 'r').read()
     schema_data += open(setup_path("schema_samba4.ldif"), 'r').read()
     schema_data = substitute_var(schema_data, {"SCHEMADN": schemadn})
+    check_all_substituted(schema_data)
     prefixmap = open(setup_path("prefixMap.txt"), 'r').read()
     prefixmap = b64encode(prefixmap)
 
@@ -1446,5 +1447,6 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename):
                     "DEFAULTSITE":sitename,
                     "PREFIXMAP_B64":prefixmap
     })
+    check_all_substituted(head_data)
     samdb.attach_schema_from_ldif(head_data, schema_data)
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list