diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 19 | ||||
-rwxr-xr-x | source4/selftest/tests.sh | 29 | ||||
-rw-r--r-- | source4/setup/provision.zone | 4 |
3 files changed, 44 insertions, 8 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 4764d0cafa..823d5e6ff6 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -959,13 +959,16 @@ def provision(setup_dir, message, session_info, paths = provision_paths_from_lp(lp, names.dnsdomain) if hostip is None: - hostip = socket.getaddrinfo(names.hostname, None, socket.AF_INET, socket.AI_CANONNAME, socket.IPPROTO_IP)[0][-1][0] + try: + hostip = socket.getaddrinfo(names.hostname, None, socket.AF_INET, socket.AI_CANONNAME, socket.IPPROTO_IP)[0][-1][0] + except socket.gaierror, (socket.EAI_NODATA, msg): + hostip = None if hostip6 is None: try: hostip6 = socket.getaddrinfo(names.hostname, None, socket.AF_INET6, socket.AI_CANONNAME, socket.IPPROTO_IP)[0][-1][0] - except socket.gaierror: - pass + except socket.gaierror, (socket.EAI_NODATA, msg): + hostip6 = None if serverrole is None: serverrole = lp.get("server role") @@ -1426,12 +1429,20 @@ def create_zone_file(path, setup_path, dnsdomain, domaindn, hostip6_base_line = "" hostip6_host_line = "" + if hostip is not None: + hostip_base_line = " IN A " + hostip + hostip_host_line = hostname + " IN A " + hostip + else: + hostip_base_line = "" + hostip_host_line = "" + setup_file(setup_path("provision.zone"), path, { "DNSPASS_B64": b64encode(dnspass), "HOSTNAME": hostname, "DNSDOMAIN": dnsdomain, "REALM": realm, - "HOSTIP": hostip, + "HOSTIP_BASE_LINE": hostip_base_line, + "HOSTIP_HOST_LINE": hostip_host_line, "DOMAINGUID": domainguid, "DATESTRING": time.strftime("%Y%m%d%H"), "DEFAULTSITE": DEFAULTSITE, diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh index fa799f51ff..42bc8141c6 100755 --- a/source4/selftest/tests.sh +++ b/source4/selftest/tests.sh @@ -4,11 +4,11 @@ # The output of this script is parsed by selftest.pl, which then decides # which of the tests to actually run. It will, for example, skip all tests -# listed in samba4-skip or only run a subset during "make quicktest". +# listed in selftest/skip or only run a subset during "make quicktest". # The idea is that this script outputs all of the tests of Samba 4, not # just those that are known to pass, and list those that should be skipped -# or are known to file in samba4-skip/samba4-knownfail. This makes it +# or are known to fail in selftest/skip or selftest/knownfail. This makes it # very easy to see what functionality is still missing in Samba 4 and makes # it possible to run the testsuite against other servers, such as Samba 3 or # Windows that have a different set of features. @@ -58,8 +58,33 @@ bin/smbtorture -V samba4srcdir=. samba4bindir=$samba4srcdir/bin + +prefix_abs="$SELFTEST_PREFIX/s4client" + +mkdir "$prefix_abs" +conffile="$SELFTEST_CONFFILE" + +TORTURE_OPTIONS="" +TORTURE_OPTIONS="$TORTURE_OPTIONS --configfile=$conffile" +TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME" +TORTURE_OPTIONS="$TORTURE_OPTIONS --target=$SELFTEST_TARGET" +TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$prefix_abs" +if [ -n "$SELFTEST_VERBOSE" ]; then + TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no" +fi +TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit" +if [ -n "$SELFTEST_QUICK" ]; then + TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes" +fi smb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS" +echo "OPTIONS $TORTURE_OPTIONS" + +SMB_CONF_PATH="$conffile" +export SMB_CONF_PATH +CONFIGURATION="--configfile=$conffile" +export CONFIGURATION + # Simple tests for LDAP and CLDAP for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do diff --git a/source4/setup/provision.zone b/source4/setup/provision.zone index 17ae3bb47a..e7d600df87 100644 --- a/source4/setup/provision.zone +++ b/source4/setup/provision.zone @@ -10,10 +10,10 @@ $TTL 1W 1W ) ; minimum IN NS ${HOSTNAME} ${HOSTIP6_BASE_LINE} - IN A ${HOSTIP} +${HOSTIP_BASE_LINE} ; ${HOSTIP6_HOST_LINE} -${HOSTNAME} IN A ${HOSTIP} +${HOSTIP_HOST_LINE} gc._msdcs IN CNAME ${HOSTNAME} ${HOSTGUID}._msdcs IN CNAME ${HOSTNAME} ; |