[PATCH] libsmbclient: Fix cli_session_setup_guest_send

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Apr 3 08:23:35 MDT 2013


Hi!

If someone feels like it, please review & push to master.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 83c545d38ad8415d3562f98b02f3350fa65e40e4 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 3 Apr 2013 13:24:53 +0200
Subject: [PATCH] libsmbclient: Fix cli_session_setup_guest_send

This worked fine so far, but for the wrong reason: We only ever called
this through the sync wrapper. The tevent_req_nterror in the NT_STATUS_OK
case does not call tevent_req_finish. So the tevent_loop_poll did call
into the core send/receive smb code. This is a fix for the case when
smb1cli_req_chain_submit fails for some reason.

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/libsmb/cliconnect.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 872900c..ec5c273 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -446,7 +446,7 @@ struct tevent_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx,
 	}
 
 	status = smb1cli_req_chain_submit(&subreq, 1);
-	if (NT_STATUS_IS_OK(status)) {
+	if (!NT_STATUS_IS_OK(status)) {
 		tevent_req_nterror(req, status);
 		return tevent_req_post(req, ev);
 	}
-- 
1.7.9.5



More information about the samba-technical mailing list