[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Dec 22 18:47:04 MST 2014


The branch, master has been updated
       via  2fdc551 winbind: Retry LogonControl RPC in ping-dc after session expiration
      from  e421351 dsdb: Add tokenGroupsGlobalAndUniversal, tokenGroups, tokenGroupsNoGCAcceptable

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


- Log -----------------------------------------------------------------
commit 2fdc55160309cec89aeb88243cb18d058c67e918
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

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

Summary of changes:
 source3/winbindd/winbindd_dual_srv.c | 10 ++++++++++
 1 file changed, 10 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 108b201..22e709f 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -668,12 +668,14 @@ 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);
 	reset_cm_connection_on_error(domain, status);
         if (!NT_STATUS_IS_OK(status)) {
@@ -701,6 +703,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);
+		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",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list