[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Oct 3 08:05:03 MDT 2012


The branch, master has been updated
       via  6245c5c wintest: Give dcpromo more time
       via  10eba77 wintest: Give netdom join more time to complete
       via  535fe95 wintest: Add config file for a second host
       via  1773fc0 wintest: bump version to 4.1
       via  1f267ca nsswitch: Build nss_winbind on all supported platforms
       via  0e037bf selftest: Always build a linux-style nss_winbind for nss_wrapper
      from  df23b17 provision: Use logger rather than print.

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


- Log -----------------------------------------------------------------
commit 6245c5cba29abb54df2f961d9cbe300a49ffdacf
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Oct 3 08:22:27 2012 +1000

    wintest: Give dcpromo more time
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Oct  3 16:04:44 CEST 2012 on sn-devel-104

commit 10eba77dcbeec4b389aeb0a456884b7f067c1a3e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 2 18:45:39 2012 +1000

    wintest: Give netdom join more time to complete

commit 535fe95f3c884b247d374685cc4408aeabc64437
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 2 12:34:10 2012 +1000

    wintest: Add config file for a second host

commit 1773fc06738846dac6c9cbfa3f3157a19f2567c1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 2 12:33:48 2012 +1000

    wintest: bump version to 4.1

commit 1f267ca10e174ec3661631df2169e381136c2540
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 2 08:12:16 2012 +1000

    nsswitch: Build nss_winbind on all supported platforms
    
    This matches what the autoconf build can do.
    
    Andrew Bartlett

commit 0e037bfc60162aa094df3e3cda59f7b9c2327ca9
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Oct 3 16:36:34 2012 +1000

    selftest: Always build a linux-style nss_winbind for nss_wrapper

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

Summary of changes:
 nsswitch/wscript_build                             |   68 +++++++++++++++++---
 selftest/target/Samba.pm                           |    9 +++
 selftest/target/Samba3.pm                          |    5 +-
 selftest/target/Samba4.pm                          |    2 +-
 .../conf/{abartlet.conf => abartlet-jesse.conf}    |   38 ++++++------
 wintest/test-s4-howto.py                           |    6 +-
 wintest/wintest.py                                 |    2 +-
 7 files changed, 92 insertions(+), 38 deletions(-)
 copy wintest/conf/{abartlet.conf => abartlet-jesse.conf} (79%)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index 3931445..8499c62 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 import Utils
+import sys
+host_os = sys.platform
 
 bld.SAMBA_LIBRARY('winbind-client',
 	source='wb_common.c',
@@ -14,19 +16,65 @@ bld.SAMBA_BINARY('nsstest',
 	deps='replace dl'
 	)
 
-if Utils.unversioned_sys_platform() == 'linux':
+# The nss_wrapper code relies strictly on the linux implementation and
+# name, so compile but do not install a copy under this name.
+bld.SAMBA_LIBRARY('nss_wrapper_winbind',
+		  source='winbind_nss_linux.c',
+		  deps='winbind-client',
+		  realname='libnss_wrapper_winbind.so.2',
+		  install=False,
+		  vnum='2')
+
+# FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
+# the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
+
+if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
 	bld.SAMBA_LIBRARY('nss_winbind',
-		source='winbind_nss_linux.c',
-		deps='winbind-client',
-		realname='libnss_winbind.so.2',
-		vnum='2')
+			  source='winbind_nss_linux.c',
+			  deps='winbind-client',
+			  realname='libnss_winbind.so.2',
+			  vnum='2')
+elif (host_os.rfind('freebsd') > -1):
+	# FreeBSD winbind client is implemented as a wrapper around
+	# the Linux version.
+	bld.SAMBA_LIBRARY('nss_winbind',
+			  source='winbind_nss_linux.c winbind_nss_freebsd.c',
+			  deps='winbind-client',
+			  realname='libnss_winbind.so.1',
+			  vnum='1')
+
+elif (host_os.rfind('netbsd') > -1):
+	# NetBSD winbind client is implemented as a wrapper
+	# around the Linux version. It needs getpwent_r() to
+	# indicate libc's use of the correct nsdispatch API.
 
-if Utils.unversioned_sys_platform() == 'sunos':
+	if bld.CONFIG_SET("HAVE_GETPWENT_R"):
+		bld.SAMBA_LIBRARY('nss_winbind',
+				  source='winbind_nss_linux.c winbind_nss_netbsd.c',
+				  deps='winbind-client', 
+				  realname='libnss_winbind.so')
+elif (host_os.rfind('irix') > -1):
+	bld.SAMBA_LIBRARY('ns_winbind',
+			  source='winbind_nss_irix.c',
+			  deps='winbind-client', 
+			  realname='libns_winbind.so')
+
+elif Utils.unversioned_sys_platform() == 'sunos':
+	bld.SAMBA_LIBRARY('nss_winbind',
+			  source='winbind_nss_solaris.c winbind_nss_linux.c',
+			  deps='winbind-client',
+			  realname='nss_winbind.so.1',
+			  vnum='1')
+elif (host_os.rfind('hpux') > -1):
+	bld.SAMBA_LIBRARY('nss_winbind',
+			  source='winbind_nss_linux.c',
+			  deps='winbind-client', 
+			  realname='libnss_winbind.so')
+elif (host_os.rfind('aix') > -1):
 	bld.SAMBA_LIBRARY('nss_winbind',
-		source='winbind_nss_solaris.c winbind_nss_linux.c',
-		deps='winbind-client',
-		realname='libnss_winbind.so.2',
-		vnum='2')
+			  source='winbind_nss_aix.c',
+			  deps='winbind-client', 
+			  realname='libnss_winbind.so')
 
 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
 	bld.SAMBA_LIBRARY('pamwinbind',
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index ec6fc48..d811053 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -64,6 +64,15 @@ sub bindir_path($$) {
 	return $path;
 }
 
+sub nss_wrapper_winbind_so_path($) {
+        my ($object) = @_;
+	my $ret = $ENV{NSS_WRAPPER_WINBIND_SO_PATH};
+        if (not defined($ret)) {
+	    $ret = bindir_path($object, "default/nsswitch/libnss-winbind.so");
+	}
+	return $ret;
+}
+
 sub mk_krb5_conf($$)
 {
 	my ($ctx, $other_realms_stanza) = @_;
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index df8b55c..8404635 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1097,10 +1097,7 @@ domusers:X:$gid_domusers:
 	$ret{SOCKET_WRAPPER_DEFAULT_IFACE} = $swiface;
 	$ret{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd;
 	$ret{NSS_WRAPPER_GROUP} = $nss_wrapper_group;
-	$ret{NSS_WRAPPER_WINBIND_SO_PATH} = $ENV{NSS_WRAPPER_WINBIND_SO_PATH};
-        if (not defined($ret{NSS_WRAPPER_WINBIND_SO_PATH})) {
-	        $ret{NSS_WRAPPER_WINBIND_SO_PATH} = Samba::bindir_path($self, "default/nsswitch/libnss-winbind.so");
-        }
+	$ret{NSS_WRAPPER_WINBIND_SO_PATH} = Samba::nss_wrapper_winbind_so_path($self);
 	$ret{LOCAL_PATH} = "$shrdir";
 
 	return \%ret;
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 003f03d..ab46f2a 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -682,7 +682,7 @@ nogroup:x:65534:nobody
 		SAMBA_TEST_FIFO => "$ctx->{prefix}/samba_test.fifo",
 		SAMBA_TEST_LOG => "$ctx->{prefix}/samba_test.log",
 		SAMBA_TEST_LOG_POS => 0,
-	        NSS_WRAPPER_WINBIND_SO_PATH => Samba::bindir_path($self, "default/nsswitch/libnss-winbind.so"),
+	        NSS_WRAPPER_WINBIND_SO_PATH => Samba::nss_wrapper_winbind_so_path($self),
                 LOCAL_PATH => $ctx->{share}
 	};
 
diff --git a/wintest/conf/abartlet.conf b/wintest/conf/abartlet-jesse.conf
similarity index 79%
copy from wintest/conf/abartlet.conf
copy to wintest/conf/abartlet-jesse.conf
index 78c0287..64a5f43 100644
--- a/wintest/conf/abartlet.conf
+++ b/wintest/conf/abartlet-jesse.conf
@@ -46,16 +46,16 @@ PASSWORD3             : p at ssw0rd3
 # a Windows7 VM
 WINDOWS7_HOSTNAME     : Windows7-3
 WINDOWS7_VM           : Windows7-3
-WINDOWS7_SNAPSHOT     : 1329351855
+WINDOWS7_SNAPSHOT     : 1346650132
 WINDOWS7_USER         : administrator
 WINDOWS7_PASS         : penguin
 
 # a winxp VM - needs Windows XP Service Pack 2 Support Tools
-WINXP_HOSTNAME        : WinXP-1
-WINXP_VM              : WinXP-1
-WINXP_SNAPSHOT        : 1329361864
-WINXP_USER            : administrator
-WINXP_PASS            : penguin
+#WINXP_HOSTNAME        : WinXP-1
+#WINXP_VM              : WinXP-1
+#WINXP_SNAPSHOT        : 1329361864
+#WINXP_USER            : administrator
+#WINXP_PASS            : penguin
 
 # Samba will join this w2k8r2 VM as a DC and then as a RODC
 W2K8R2A_HOSTNAME      : Win2008R2-3
@@ -63,42 +63,42 @@ W2K8R2A_VM            : Win2008R2-3
 W2K8R2A_REALM         : 2008R2.HOWTO.ABARTLET.NET
 W2K8R2A_DOMAIN        : 2008R2HOWTO
 W2K8R2A_PASS          : penguin12#
-W2K8R2A_SNAPSHOT      : 1329218595
-W2K8R2A_IP            : 192.168.122.57
+W2K8R2A_SNAPSHOT      : 1349167901
+W2K8R2A_IP            : 192.168.122.24
 
 # this w2k8r2 VM will become a DC in the samba domain
 W2K8R2B_HOSTNAME      : Win2008R2-7
 W2K8R2B_VM            : Win2008R2-7
 W2K8R2B_PASS          : penguin12#
-W2K8R2B_SNAPSHOT      : 1329964204
+W2K8R2B_SNAPSHOT      : 1347439285
 
 # this w2k8r2 VM will become a RODC in the samba domain
 W2K8R2C_HOSTNAME      : Win2008R2-6
 W2K8R2C_VM            : Win2008R2-6
 W2K8R2C_PASS          : penguin12#
-W2K8R2C_SNAPSHOT      : 1329785556
+W2K8R2C_SNAPSHOT      : 1347437454
 
 # Samba will join this w2k3 VM as a DC
-W2K3A_HOSTNAME        : Win2003R2-2
-W2K3A_VM              : Win2003R2-2
-W2K3A_REALM           : 2003.HOWTO.ABARTLET.NET
-W2K3A_DOMAIN          : 2003HOWTO
-W2K3A_PASS            : penguin
-W2K3A_SNAPSHOT        : 1314652035
-W2K3A_IP              : 192.168.122.91
+#W2K3A_HOSTNAME        : Win2003R2-2
+#W2K3A_VM              : Win2003R2-2
+#W2K3A_REALM           : 2003.HOWTO.ABARTLET.NET
+#W2K3A_DOMAIN          : 2003HOWTO
+#W2K3A_PASS            : penguin
+#W2K3A_SNAPSHOT        : 1314652035
+#W2K3A_IP              : 192.168.122.91
 
 # this w2k3 VM will become a DC in the samba domain
 W2K3B_HOSTNAME        : Win2003R2-4
 W2K3B_VM              : Win2003R2-4
 W2K3B_PASS            : penguin
-W2K3B_SNAPSHOT        : 1331186260
+W2K3B_SNAPSHOT        : 1347424723
 W2K3B_IP              : 192.168.122.164
 
 # this w2k3 VM will become a member in the samba domain
 W2K3C_HOSTNAME        : Win2003R2-3
 W2K3C_VM              : Win2003R2-3
 W2K3C_PASS            : penguin
-W2K3C_SNAPSHOT        : 1329451062
+W2K3C_SNAPSHOT        : 1347423953
 W2K3C_IP              : 192.168.122.162
 
 
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index c20a4fe..e290b07 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -57,7 +57,7 @@ def start_s4(t):
     t.chdir("${PREFIX}")
     t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
     t.run_cmd(['sbin/samba',
-             '--option', 'panic action=gnome-terminal -e "gdb --pid %d"'])
+             '--option', 'panic action=gnome-terminal -e "gdb --pid %d"', '--option', 'max protocol=nt1'])
     t.port_wait("${INTERFACE_IP}", 139)
 
 def test_smbclient(t):
@@ -65,7 +65,7 @@ def test_smbclient(t):
     t.info('Testing smbclient')
     smbclient = t.getvar("smbclient")
     t.chdir('${PREFIX}')
-    t.cmd_contains("%s --version" % (smbclient), ["Version 4.0"])
+    t.cmd_contains("%s --version" % (smbclient), ["Version 4.1"])
     t.retry_cmd('%s -L ${INTERFACE_IP} -U%%' % (smbclient), ["netlogon", "sysvol", "IPC Service"])
     child = t.pexpect_spawn('%s //${INTERFACE_IP}/netlogon -Uadministrator%%${PASSWORD1}' % (smbclient))
     child.expect("smb:")
@@ -174,7 +174,7 @@ SafeModeAdminPassword=${PASSWORD1}
     child.expect("C:")
     child.expect("C:")
     child.sendline("dcpromo /answer:answers.txt")
-    i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=120)
+    i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=240)
     if i == 1 or i == 2:
         child.sendline("echo off")
         child.sendline("echo START DCPROMO log")
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 2b33950..c0f1eeb 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -878,7 +878,7 @@ RebootOnCompletion=No
             child.expect("C:")
             child.sendline("netdom join ${WIN_HOSTNAME} /Domain:%s /UserD:%s /PasswordD:%s" % (domain, username, password))
             i = child.expect(["The command completed successfully", 
-                             "The specified domain either does not exist or could not be contacted."])
+                             "The specified domain either does not exist or could not be contacted."], timeout=120)
             if i == 0:
                 break
             time.sleep(10)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list