[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri Apr 19 07:07:02 MDT 2013


The branch, master has been updated
       via  d51b498 s3:locking add NDR debug in share_mode_forall
       via  63f78c3 s3:rpc_server increase a debug level
       via  47f8e21 s3:registry increase a debug level
       via  165b7aa s3:smbd stop working on a dead client socket
       via  58275be s3:smbd increase a loglevel
       via  de1c833 s3:smbstatus do not print orphaned share entries
       via  5aa9e55 smbd: Fix signing when the async echo handler kicks in
      from  77f7a46 s4:dsdb: Fix warnings about not set / set but unused / shadowed variables

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


- Log -----------------------------------------------------------------
commit d51b498017d612d9787b17b38ac0931ee0a90de0
Author: Christian Ambach <ambi at samba.org>
Date:   Fri Apr 19 11:10:45 2013 +0200

    s3:locking add NDR debug in share_mode_forall
    
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Signed-off-by: Christian Ambach <ambi at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Apr 19 15:06:33 CEST 2013 on sn-devel-104

commit 63f78c36b4edfb8e4a06d13f7cd5e1b719c85cef
Author: Christian Ambach <ambi at samba.org>
Date:   Fri Apr 19 11:21:06 2013 +0200

    s3:rpc_server increase a debug level
    
    those messages are not worth level 0 or 1 and potentially
    clutter the system logs
    
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Signed-off-by: Christian Ambach <ambi at samba.org>

commit 47f8e210436d89f00eca52d4784a544ab25b9ac8
Author: Christian Ambach <ambi at samba.org>
Date:   Fri Apr 19 11:20:38 2013 +0200

    s3:registry increase a debug level
    
    do not clutter the logs
    
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Signed-off-by: Christian Ambach <ambi at samba.org>

commit 165b7aa58690cbc6a288b70e5690bf2e93f3ca62
Author: Christian Ambach <ambi at samba.org>
Date:   Fri Apr 19 10:04:08 2013 +0200

    s3:smbd stop working on a dead client socket
    
    when the client has already disconnected, exit server as done
    in other paths in smbd_process
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 58275be0eb68d01a238f0fedf4c92b63f7d10b53
Author: Christian Ambach <ambi at samba.org>
Date:   Mon Apr 8 18:09:05 2013 +0200

    s3:smbd increase a loglevel
    
    do not complain too loudly if the socket has already gone
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit de1c833b3a06ce2f7599ef58b26b473ed00ae55f
Author: Christian Ambach <ambi at samba.org>
Date:   Thu Apr 18 17:09:32 2013 +0200

    s3:smbstatus do not print orphaned share entries
    
    Pair-Programmed-With: Volker Lendecke <vl at samba.org>
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 5aa9e552ec70ffbd48495e0d7c28517e726487bf
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 19 12:36:08 2013 +0200

    smbd: Fix signing when the async echo handler kicks in
    
    This was introduced as a copy&paste error in 5e0258fc932c
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Christian Ambach <ambi at samba.org>

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

Summary of changes:
 source3/locking/share_mode_lock.c |    4 ++++
 source3/registry/reg_perfcount.c  |    2 +-
 source3/rpc_server/srv_pipe.c     |   16 ++++++++--------
 source3/smbd/process.c            |   13 +++++++------
 source3/utils/status.c            |    6 ++++++
 5 files changed, 26 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c
index 04ff247..d45b450 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -463,6 +463,10 @@ static int traverse_fn(struct db_record *rec, void *_state)
 		DEBUG(1, ("ndr_pull_share_mode_lock failed\n"));
 		return 0;
 	}
+	if (DEBUGLEVEL > 10) {
+		DEBUG(11, ("parse_share_modes:\n"));
+		NDR_PRINT_DEBUG(share_mode_data, d);
+	}
 	for (i=0; i<d->num_share_modes; i++) {
 		state->fn(&d->share_modes[i],
 			  d->servicepath, d->base_name,
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index cfefb1f..82e5624 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -77,7 +77,7 @@ uint32 reg_perfcount_get_base_index(void)
 	names = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDONLY, 0444);
 
 	if ( !names ) {
-		DEBUG(1, ("reg_perfcount_get_base_index: unable to open [%s].\n", fname));
+		DEBUG(2, ("reg_perfcount_get_base_index: unable to open [%s].\n", fname));
 		return 0;
 	}    
 	/* needs to read the value of key "1" from the counter_names.tdb file, as that is
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 7cce180..894f12c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -968,7 +968,7 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt)
 	DEBUG(5, ("api_pipe_bind_auth3: decode request. %d\n", __LINE__));
 
 	if (pkt->auth_length == 0) {
-		DEBUG(0, ("No auth field sent for bind request!\n"));
+		DEBUG(1, ("No auth field sent for bind request!\n"));
 		goto err;
 	}
 
@@ -976,7 +976,7 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt)
 	if (pkt->frag_length < RPC_HEADER_LEN
 				+ DCERPC_AUTH_TRAILER_LENGTH
 				+ pkt->auth_length) {
-			DEBUG(0,("api_pipe_ntlmssp_auth_process: auth_len "
+			DEBUG(1,("api_pipe_ntlmssp_auth_process: auth_len "
 				"%u is too large.\n",
                         (unsigned int)pkt->auth_length));
 		goto err;
@@ -990,7 +990,7 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt)
 					 &pkt->u.auth3.auth_info,
 					 &auth_info, p->endian);
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(0, ("Failed to unmarshall dcerpc_auth.\n"));
+		DEBUG(1, ("Failed to unmarshall dcerpc_auth.\n"));
 		goto err;
 	}
 
@@ -1000,7 +1000,7 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt)
 	 */
 
 	if (auth_info.auth_type != p->auth.auth_type) {
-		DEBUG(0, ("Auth type mismatch! Client sent %d, "
+		DEBUG(1, ("Auth type mismatch! Client sent %d, "
 			  "but auth was started as type %d!\n",
 			  auth_info.auth_type, p->auth.auth_type));
 		goto err;
@@ -1017,7 +1017,7 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt)
 					     &response);
 		break;
 	default:
-		DEBUG(0, (__location__ ": incorrect auth type (%u).\n",
+		DEBUG(1, (__location__ ": incorrect auth type (%u).\n",
 			  (unsigned int)auth_info.auth_type));
 		return false;
 	}
@@ -1025,21 +1025,21 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt)
 	if (NT_STATUS_EQUAL(status,
 			    NT_STATUS_MORE_PROCESSING_REQUIRED) ||
 	    response.length) {
-		DEBUG(0, (__location__ ": This was supposed to be the final "
+		DEBUG(1, (__location__ ": This was supposed to be the final "
 			  "leg, but crypto machinery claims a response is "
 			  "needed, aborting auth!\n"));
 		data_blob_free(&response);
 		goto err;
 	}
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(0, ("Auth failed (%s)\n", nt_errstr(status)));
+		DEBUG(2, ("Auth failed (%s)\n", nt_errstr(status)));
 		goto err;
 	}
 
 	/* Now verify auth was indeed successful and extract server info */
 	status = pipe_auth_verify_final(p);
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(0, ("Auth Verify failed (%s)\n", nt_errstr(status)));
+		DEBUG(2, ("Auth Verify failed (%s)\n", nt_errstr(status)));
 		goto err;
 	}
 
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 1ebda79..20e2c11 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2412,7 +2412,7 @@ static void smbd_server_connection_read_handler(
 				    &unread_bytes,
 				    &encrypted,
 				    &inbuf_len, &seqnum,
-				    false /* trusted channel */);
+				    !from_client /* trusted channel */);
 
 	if (from_client) {
 		smbd_unlock_socket(sconn);
@@ -3577,11 +3577,12 @@ void smbd_process(struct tevent_context *ev_ctx,
 				DEBUG(0, ("ctdbd_register_ips failed: %s\n",
 					  nt_errstr(status)));
 			}
-		} else
-		{
-			DEBUG(0,("Unable to get tcp info for "
-				 "CTDB_CONTROL_TCP_CLIENT: %s\n",
-				 strerror(errno)));
+		} else {
+			int level = (errno == ENOTCONN)?2:0;
+			DEBUG(level,("Unable to get tcp info for "
+				     "smbd_register_ips: %s\n",
+				     strerror(errno)));
+			exit_server_cleanly("client_get_tcp_info() failed.\n");
 		}
 	}
 
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 28a79d6..f4b5f4e 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -43,6 +43,7 @@
 #include "smbd/smbd.h"
 #include "librpc/gen_ndr/notify.h"
 #include "lib/conn_tdb.h"
+#include "serverid.h"
 
 #define SMB_MAXPIDS		2048
 static uid_t 		Ucrit_uid = 0;               /* added by OH */
@@ -132,6 +133,11 @@ static void print_share_mode(const struct share_mode_entry *e,
 	}
 	count++;
 
+	if (do_checks && !serverid_exists(&e->pid)) {
+		/* the process for this entry does not exist any more */
+		return;
+	}
+
 	if (Ucrit_checkPid(e->pid)) {
 		d_printf("%-11s  ",procid_str_static(&e->pid));
 		d_printf("%-9u  ", (unsigned int)e->uid);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list