[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Sun Jan 11 08:11:03 MST 2015


The branch, v4-0-test has been updated
       via  4f6075e nsswitch: fix soname of linux nss_*.so.2 modules
       via  53f27f1 selftest: use shared/libnss_wrapper_winbind.so.2
       via  61c1e5a wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()
       via  ae18bda winbind: Retry after SESSION_EXPIRED error in ping-dc
       via  db79019 winbind: Retry LogonControl RPC in ping-dc after session expiration
      from  eb3ed91 libcli/smb: only force signing of smb2 session setups when binding a new session

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


- Log -----------------------------------------------------------------
commit 4f6075e4ccc8d42c530477e1458db3a2d32f0f5e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 18 10:33:34 2014 +0100

    nsswitch: fix soname of linux nss_*.so.2 modules
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    (similar to commit 575b093dac3c509b1bfaab0b4ad29b9b4214e487)
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Sun Jan 11 16:10:35 CET 2015 on sn-devel-104

commit 53f27f12fe6e1c172adf4ae7d0195152a1bcfe6b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 18 20:13:44 2014 +0100

    selftest: use shared/libnss_wrapper_winbind.so.2
    
    This library is always available in make test.
    nss-wrapper strictly requires the linux nss api.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    (similar to commit 4eb24fa545234be506eb1330ccbbfd5c2b9e0d82)

commit 61c1e5af41e34da96973eb7e5856c276710b1118
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 18 10:21:30 2014 +0100

    wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    (similar to commit 82e583b04b04e560c121163850d70c52d2fce78d)

commit ae18bda975dee2351b9af59120fe8b8de1dc56b3
Author: Christof Schmitt <cs at samba.org>
Date:   Fri Dec 19 12:24:53 2014 -0700

    winbind: Retry after SESSION_EXPIRED error in ping-dc
    
    Trying to establish a netlogon connection when the service ticket
    expires might fail with NT_STATUS_NETWORK_SESSION_EXPIRED. The
    underlying client code already marks the session as invalid, so retry
    the netlogon connect in this case.
    
    Signed-off-by: Christof Schmit <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jan  6 02:58:57 CET 2015 on sn-devel-104
    (cherry picked from commit a2670f15dea27c10e3827216adf572f9c3894f85)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11034

commit db7901981d3518bb8db7578bcb03f3787b3b080b
Author: Christof Schmitt <cs at samba.org>
Date:   Mon Dec 22 15:19:47 2014 -0800

    winbind: Retry LogonControl RPC in ping-dc after session expiration
    
    When the underlying session expires, the LogonControl RPC call used in
    ping-dc returns NT_STATUS_IO_DEVICE_ERROR. Retry once in this case,
    instead of returning the error to the caller.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Dec 23 02:46:34 CET 2014 on sn-devel-104
    (cherry picked from commit 2fdc55160309cec89aeb88243cb18d058c67e918)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11034

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

Summary of changes:
 buildtools/wafsamba/wafsamba.py      |  6 +++++-
 nsswitch/wscript_build               | 24 ++++++++++++++++++------
 selftest/target/Samba.pm             |  2 +-
 source3/winbindd/winbindd_dual_srv.c | 18 ++++++++++++++++++
 source3/wscript_build                |  7 -------
 source4/selftest/tests.py            |  2 +-
 6 files changed, 43 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index d26b7b5..ba8b40b 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -109,6 +109,7 @@ def SAMBA_LIBRARY(bld, libname, source,
                   ldflags='',
                   external_library=False,
                   realname=None,
+                  keep_underscore=False,
                   autoproto=None,
                   autoproto_extra_source='',
                   group='libraries',
@@ -209,7 +210,10 @@ def SAMBA_LIBRARY(bld, libname, source,
                        libname)
 
     if target_type == 'PYTHON' or realname or not private_library:
-        bundled_name = libname.replace('_', '-')
+        if keep_underscore:
+            bundled_name = libname
+        else:
+            bundled_name = libname.replace('_', '-')
     else:
         bundled_name = PRIVATE_NAME(bld, libname, bundled_extension,
             private_library)
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index 55ba776..0e33730 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -30,12 +30,24 @@ bld.SAMBA_LIBRARY('nss_wrapper_winbind',
 # 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',
-			  soname='libnss_winbind.so',
-			  vnum='2')
+    bld.SAMBA_LIBRARY('nss_winbind',
+              keep_underscore=True,
+              source='winbind_nss_linux.c',
+              deps='winbind-client',
+              public_headers=[],
+              public_headers_install=False,
+              pc_files=[],
+              vnum='2')
+
+    # for nss_wins is linux only
+    bld.SAMBA3_LIBRARY('nss_wins',
+                       keep_underscore=True,
+                       source='wins.c',
+                       deps='''param libsmb LIBTSOCKET''',
+                       public_headers=[],
+                       public_headers_install=False,
+                       pc_files=[],
+                       vnum='2')
 elif (host_os.rfind('freebsd') > -1):
 	# FreeBSD winbind client is implemented as a wrapper around
 	# the Linux version.
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index 5f18a47..0b9c096 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -68,7 +68,7 @@ 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");
+	    $ret = bindir_path($object, "shared/libnss_wrapper_winbind.so.2");
 	}
 	return $ret;
 }
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 4227d6a..22dfbb7 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -687,13 +687,23 @@ NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r)
 	WERROR werr;
 	fstring logon_server;
 	struct dcerpc_binding_handle *b;
+	bool retry = false;
 
 	domain = wb_child_domain();
 	if (domain == NULL) {
 		return NT_STATUS_REQUEST_NOT_ACCEPTED;
 	}
 
+reconnect:
 	status = cm_connect_netlogon(domain, &netlogon_pipe);
+	if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_SESSION_EXPIRED)) {
+		/*
+		 * Retry to open new connection with new kerberos ticket.
+		 */
+		invalidate_cm_connection(&domain->conn);
+		status = cm_connect_netlogon(domain, &netlogon_pipe);
+	}
+
 	reset_cm_connection_on_error(domain, status);
         if (!NT_STATUS_IS_OK(status)) {
                 DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
@@ -719,6 +729,14 @@ NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r)
 					  logon_server, NETLOGON_CONTROL_QUERY,
 					  2, &info, &werr);
 
+	if (NT_STATUS_EQUAL(status, NT_STATUS_IO_DEVICE_ERROR) && !retry) {
+		DEBUG(10, ("Session might have expired. "
+			   "Reconnect and retry once.\n"));
+		invalidate_cm_connection(&domain->conn);
+		retry = true;
+		goto reconnect;
+	}
+
 	reset_cm_connection_on_error(domain, status);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(2, ("dcerpc_netr_LogonControl failed: %s\n",
diff --git a/source3/wscript_build b/source3/wscript_build
index c4281ed..8795a93 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -653,13 +653,6 @@ bld.SAMBA3_LIBRARY('smbsharemodes',
                     vnum='0',
                     vars=locals())
 
-bld.SAMBA3_LIBRARY('nss_wins',
-                  source=WINBIND_WINS_NSS_SRC,
-                  deps='''param libsmb LIBTSOCKET''',
-                  realname='libnss_wins.so.2',
-                  soname='libnss_wins.so',
-                  vnum='2')
-
 bld.SAMBA3_LIBRARY('gse',
                    source='librpc/crypto/gse_krb5.c librpc/crypto/gse.c',
                    deps='krb5samba gensec param KRBCLIENT secrets3',
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 6552b35..004118b 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -382,7 +382,7 @@ for env in ["plugin_s4_dc", "dc", "s4member"]:
 nsstest4 = binpath("nsstest")
 for env in ["plugin_s4_dc", "dc", "s4member", "s3dc", "s3member", "member"]:
     if os.path.exists(nsstest4):
-        plantestsuite("samba4.nss.test using winbind(%s)" % env, env, [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "default/nsswitch/libnss-winbind.so")])
+        plantestsuite("samba4.nss.test using winbind(%s)" % env, env, [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "shared/libnss_wrapper_winbind.so.2")])
     else:
         skiptestsuite("samba4.nss.test using winbind(%s)" % env, "nsstest not available")
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list