[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Mon Nov 15 04:34:01 MST 2010


The branch, master has been updated
       via  88d694a waf: fixed configure again on RHEL5
       via  e409db9 s4-dns: added --fail-immediately option to samba_dnsupdate
       via  deaf7e5 s4-dns: fixed registration of multiple IPs in samba_dnsupdate
      from  1e29ee3 heimdal Fix handling of backwards cross-realm detection for Samba4

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 88d694ac8e808a22495dcdd6af181f4738c1f21c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 15 21:45:42 2010 +1100

    waf: fixed configure again on RHEL5
    
    the fancier cmd_output() broke git versioning
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Mon Nov 15 11:33:41 UTC 2010 on sn-devel-104

commit e409db9da170ae24e3806ccf87d411b42e582945
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 15 19:09:14 2010 +1100

    s4-dns: added --fail-immediately option to samba_dnsupdate
    
    this is useful for manual testing

commit deaf7e5995c5120a8009dcd90e17f7e0678d1206
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 15 10:54:50 2010 +1100

    s4-dns: fixed registration of multiple IPs in samba_dnsupdate
    
    bitten by python object references again!
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 buildtools/wafsamba/samba_version.py  |    2 +-
 source4/scripting/bin/samba_dnsupdate |   16 ++++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 69f36eb..e6a6ccf 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -49,7 +49,7 @@ def git_version_summary(path, have_git):
     if not have_git:
         return ("GIT-UNKNOWN", {})
 
-    git = Utils.cmd_output(env={"GIT_DIR": "%s/.git" % path}, cmd=["git", "show", '--pretty=format:%h%n%ct%n%H%n%cd', "--stat", "HEAD"])
+    git = Utils.cmd_output('git show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True)
 
     lines = git.splitlines()
     fields = {
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 072f818..9911c6a 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -22,6 +22,7 @@ import os
 import fcntl
 import sys
 import tempfile
+import subprocess
 
 # ensure we get messages out immediately, so they get in the samba logs,
 # and don't get swallowed by a timeout
@@ -49,6 +50,7 @@ import dns.resolver as resolver
 
 default_ttl = 900
 am_rodc = False
+error_count = 0
 
 parser = optparse.OptionParser("samba_dnsupdate")
 sambaopts = options.SambaOptions(parser)
@@ -59,6 +61,7 @@ parser.add_option("--all-names", action="store_true")
 parser.add_option("--all-interfaces", action="store_true")
 parser.add_option("--use-file", type="string", help="Use a file, rather than real DNS calls")
 parser.add_option("--update-list", type="string", help="Add DNS names from the given file")
+parser.add_option("--fail-immediately", action='store_true', help="Exit on first failure")
 
 creds = None
 ccachename = None
@@ -253,7 +256,14 @@ def call_nsupdate(d):
     f.close()
 
     os.putenv("KRB5CCNAME", ccachename)
-    os.system("%s %s" % (nsupdate_cmd, tmpfile))
+    try:
+        cmd = "%s %s" % (nsupdate_cmd, tmpfile)
+        subprocess.check_call(cmd, shell=True)
+    except subprocess.CalledProcessError:
+        global error_count
+        if opts.fail_immediately:
+            sys.exit(1)
+        error_count = error_count + 1
     os.unlink(tmpfile)
 
 
@@ -360,7 +370,7 @@ for d in dns_list:
     if d.type == 'A' and d.ip == "$IP":
         d.ip = IPs[0]
         for i in range(len(IPs)-1):
-            d2 = d
+            d2 = dnsobj(str(d))
             d2.ip = IPs[i+1]
             dns_list.append(d2)
 
@@ -392,3 +402,5 @@ for d in update_list:
 # delete the ccache if we created it
 if ccachename is not None:
     os.unlink(ccachename)
+
+sys.exit(error_count)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list