[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Fri Aug 1 04:12:05 MDT 2014


The branch, master has been updated
       via  c01ee46 winbindd-irpc: Ensure not to call irpc_send_reply twice on error
       via  36ecbf3 libcli/auth: Ensure that the dns_names in/out parameter is preserved
      from  95d1828 waf: socket_wrapper should check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.

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


- Log -----------------------------------------------------------------
commit c01ee4614a0fb9b017ca240e8929fe1da6268da4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jul 24 16:01:05 2014 +1200

    winbindd-irpc: Ensure not to call irpc_send_reply twice on error
    
    As found during investigation of the previous commit, when the RPC
    call fails totally, we must only try and send one error reply.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Pair-programmed-with: Garming Sam <garming at catalyst.net.nz>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Aug  1 12:11:29 CEST 2014 on sn-devel-104

commit 36ecbf34ba7fd5d46118bd3403128155c47ea1fd
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jul 24 15:54:58 2014 +1200

    libcli/auth: Ensure that the dns_names in/out parameter is preserved
    
    This is in dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords, which has
    status variables filled in by the server and placed in this in/out
    array.
    
    This showed up as a segfault in winbindd during RODC DNS update.
    
    Andrew Bartlett
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Pair-programmed-with: Garming Sam <garming at catalyst.net.nz>

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

Summary of changes:
 libcli/auth/netlogon_creds_cli.c |    9 ++++++++-
 source3/winbindd/winbindd_irpc.c |    1 +
 2 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
index d709e6a..a461dc6 100644
--- a/libcli/auth/netlogon_creds_cli.c
+++ b/libcli/auth/netlogon_creds_cli.c
@@ -2754,7 +2754,14 @@ static void netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_done(struct tev
 	NTSTATUS result;
 	bool ok;
 
-	status = dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_recv(subreq, state,
+	/*
+	 * We use state->dns_names as the memory context, as this is
+	 * the only in/out variable and it has been overwritten by the
+	 * out parameter from the server.
+	 *
+	 * We need to preserve the return value until the caller can use it.
+	 */
+	status = dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_recv(subreq, state->dns_names,
 								    &result);
 	TALLOC_FREE(subreq);
 	if (tevent_req_nterror(req, status)) {
diff --git a/source3/winbindd/winbindd_irpc.c b/source3/winbindd/winbindd_irpc.c
index cf58a08..aeaea71 100644
--- a/source3/winbindd/winbindd_irpc.c
+++ b/source3/winbindd/winbindd_irpc.c
@@ -51,6 +51,7 @@ static void wb_irpc_forward_callback(struct tevent_req *subreq)
 		DEBUG(0,("RPC callback failed for %s - %s\n",
 			 opname, nt_errstr(status)));
 		irpc_send_reply(st->msg, status);
+		return;
 	}
 
 	irpc_send_reply(st->msg, status);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list