[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri May 20 07:07:03 MDT 2011


The branch, master has been updated
       via  8a2eff8 s3: Fork the echo handler only after SMB1 negprot is done
       via  af9afe9 s3: Fix Coverity ID 2573: UNUSED_VALUE
       via  f043bab s3: Fix an uninitialized variable
      from  1e472f1 s3:testparm: don't return an error for a warning message

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


- Log -----------------------------------------------------------------
commit 8a2eff871f990aaaf1e11b333035097f5e6d3268
Author: Volker Lendecke <vl at samba.org>
Date:   Fri May 20 13:07:17 2011 +0200

    s3: Fork the echo handler only after SMB1 negprot is done
    
    This enables activating the echo responder also if SMB2 is enabled, albeit it
    will only be used for SMB1 at this moment.
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Fri May 20 15:06:03 CEST 2011 on sn-devel-104

commit af9afe9f4fc21b9c800bb14c65cbfecb155d3519
Author: Volker Lendecke <vl at samba.org>
Date:   Fri May 20 13:25:31 2011 +0200

    s3: Fix Coverity ID 2573: UNUSED_VALUE
    
    Andrew B., please check!

commit f043babcbdef26980a607de517be05092bf037a9
Author: Volker Lendecke <vl at samba.org>
Date:   Fri May 20 15:21:43 2011 +0200

    s3: Fix an uninitialized variable

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

Summary of changes:
 source3/lib/netapi/netapi.c |    5 +++--
 source3/smbd/negprot.c      |    5 +++++
 source3/smbd/process.c      |    9 ++-------
 source3/smbd/proto.h        |    1 +
 source3/smbd/reply.c        |    2 +-
 5 files changed, 12 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c
index 06e353d..1d34934 100644
--- a/source3/lib/netapi/netapi.c
+++ b/source3/lib/netapi/netapi.c
@@ -293,9 +293,10 @@ char *libnetapi_errstr(NET_API_STATUS status)
 	if (status & 0xc0000000) {
 		ret = talloc_strdup(NULL, 
 				     get_friendly_nt_error_msg(NT_STATUS(status)));
+	} else {
+		ret = talloc_strdup(NULL,
+				    get_friendly_werror_msg(W_ERROR(status)));
 	}
-
-	ret = talloc_strdup(NULL, get_friendly_werror_msg(W_ERROR(status)));
 	TALLOC_FREE(frame);
 	return ret;
 }
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 9f201b8..aa10563 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -716,6 +716,11 @@ void reply_negprot(struct smb_request *req)
 	}
 
 	TALLOC_FREE(cliprotos);
+
+	if (lp_async_smb_echo_handler() && !fork_echo_handler(sconn)) {
+		exit_server("Failed to fork echo handler");
+	}
+
 	END_PROFILE(SMBnegprot);
 	return;
 }
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 5f9845c..7f04a7b 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2798,7 +2798,7 @@ static void smbd_echo_loop(struct smbd_server_connection *sconn,
 /*
  * Handle SMBecho requests in a forked child process
  */
-static bool fork_echo_handler(struct smbd_server_connection *sconn)
+bool fork_echo_handler(struct smbd_server_connection *sconn)
 {
 	int listener_pipe[2];
 	int res;
@@ -2912,8 +2912,7 @@ void smbd_process(struct smbd_server_connection *sconn)
 	const char *remaddr = NULL;
 	int ret;
 
-	if (lp_maxprotocol() == PROTOCOL_SMB2 &&
-	    !lp_async_smb_echo_handler()) {
+	if (lp_maxprotocol() == PROTOCOL_SMB2) {
 		/*
 		 * We're not making the decision here,
 		 * we're just allowing the client
@@ -3034,10 +3033,6 @@ void smbd_process(struct smbd_server_connection *sconn)
 		exit_server("Failed to init smb_signing");
 	}
 
-	if (lp_async_smb_echo_handler() && !fork_echo_handler(sconn)) {
-		exit_server("Failed to fork echo handler");
-	}
-
 	/* Setup oplocks */
 	if (!init_oplocks(sconn->msg_ctx))
 		exit_server("Failed to init oplocks");
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 1f2b1a9..589d45d 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -750,6 +750,7 @@ size_t req_wct_ofs(struct smb_request *req);
 void chain_reply(struct smb_request *req);
 bool req_is_in_chain(struct smb_request *req);
 void smbd_process(struct smbd_server_connection *sconn);
+bool fork_echo_handler(struct smbd_server_connection *sconn);
 
 /* The following definitions come from smbd/quotas.c  */
 
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index fc381d8..99ab4ca 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5815,7 +5815,7 @@ static void rename_open_files(connection_struct *conn,
 	files_struct *fsp;
 	bool did_rename = False;
 	NTSTATUS status;
-	uint32_t new_name_hash;
+	uint32_t new_name_hash = 0;
 
 	for(fsp = file_find_di_first(conn->sconn, lck->id); fsp;
 	    fsp = file_find_di_next(fsp)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list