[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Tue Nov 3 14:16:03 UTC 2015


The branch, master has been updated
       via  4f84372 notifyd: Do not include CTDB headers without CLUSTER_SUPPORT enabled
       via  ed1e646 smbd: Do not include CTDB headers without CLUSTER_SUPPORT enabled
      from  af92f1b s4.torture.smb2/session : Replace CHECK_VAL with torture macros

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


- Log -----------------------------------------------------------------
commit 4f84372aa8beb7649111af5d2ee62112bcee5328
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Nov 3 12:14:41 2015 +1100

    notifyd: Do not include CTDB headers without CLUSTER_SUPPORT enabled
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Tue Nov  3 15:15:56 CET 2015 on sn-devel-104

commit ed1e6463a7809b12b105d03b15da158c3075478c
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Nov 3 12:37:38 2015 +1100

    smbd: Do not include CTDB headers without CLUSTER_SUPPORT enabled
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>

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

Summary of changes:
 source3/smbd/notifyd/notifyd.c | 38 +++++++++++++++++++++++++++++++++++---
 source3/smbd/server.c          |  9 ++++++++-
 2 files changed, 43 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/notifyd/notifyd.c b/source3/smbd/notifyd/notifyd.c
index 141556d..316cdea 100644
--- a/source3/smbd/notifyd/notifyd.c
+++ b/source3/smbd/notifyd/notifyd.c
@@ -33,11 +33,14 @@
 #include "ctdbd_conn.h"
 #include "ctdb_srvids.h"
 #include "source3/smbd/proto.h"
-#include "ctdb/include/ctdb_protocol.h"
 #include "server_id_db_util.h"
 #include "lib/util/iov_buf.h"
 #include "messages_util.h"
 
+#ifdef CLUSTER_SUPPORT
+#include "ctdb_protocol.h"
+#endif
+
 struct notifyd_peer;
 
 /*
@@ -130,12 +133,16 @@ static bool notifyd_get_db(struct messaging_context *msg_ctx,
 static bool notifyd_got_db(struct messaging_context *msg_ctx,
 			   struct messaging_rec **prec,
 			   void *private_data);
+
+#ifdef CLUSTER_SUPPORT
 static void notifyd_broadcast_reclog(struct ctdbd_connection *ctdbd_conn,
 				     struct server_id src,
 				     struct messaging_reclog *log);
+#endif
 static void notifyd_sys_callback(struct sys_notify_context *ctx,
 				 void *private_data, struct notify_event *ev);
 
+#ifdef CLUSTER_SUPPORT
 static struct tevent_req *notifyd_broadcast_reclog_send(
 	TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 	struct ctdbd_connection *ctdbd_conn, struct server_id src,
@@ -146,6 +153,7 @@ static struct tevent_req *notifyd_clean_peers_send(
 	TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 	struct notifyd_state *notifyd);
 static int notifyd_clean_peers_recv(struct tevent_req *req);
+#endif
 
 static int sys_notify_watch_dummy(
 	TALLOC_CTX *mem_ctx,
@@ -165,12 +173,15 @@ static int sys_notify_watch_dummy(
 }
 
 static void notifyd_handler_done(struct tevent_req *subreq);
+
+#ifdef CLUSTER_SUPPORT
 static void notifyd_broadcast_reclog_finished(struct tevent_req *subreq);
 static void notifyd_clean_peers_finished(struct tevent_req *subreq);
 static int notifyd_snoop_broadcast(uint32_t src_vnn, uint32_t dst_vnn,
 				   uint64_t dst_srvid,
 				   const uint8_t *msg, size_t msglen,
 				   void *private_data);
+#endif
 
 struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 				struct messaging_context *msg_ctx,
@@ -253,6 +264,7 @@ struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 		return req;
 	}
 
+#ifdef CLUSTER_SUPPORT
 	state->log = talloc_zero(state, struct messaging_reclog);
 	if (tevent_req_nomem(state->log, req)) {
 		return tevent_req_post(req, ev);
@@ -280,6 +292,7 @@ struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 		tevent_req_error(req, ret);
 		return tevent_req_post(req, ev);
 	}
+#endif
 
 	return req;
 }
@@ -295,6 +308,8 @@ static void notifyd_handler_done(struct tevent_req *subreq)
 	tevent_req_error(req, ret);
 }
 
+#ifdef CLUSTER_SUPPORT
+
 static void notifyd_broadcast_reclog_finished(struct tevent_req *subreq)
 {
 	struct tevent_req *req = tevent_req_callback_data(
@@ -317,6 +332,8 @@ static void notifyd_clean_peers_finished(struct tevent_req *subreq)
 	tevent_req_error(req, ret);
 }
 
+#endif
+
 int notifyd_recv(struct tevent_req *req)
 {
 	return tevent_req_simple_recv_unix(req);
@@ -552,8 +569,6 @@ static bool notifyd_rec_change(struct messaging_context *msg_ctx,
 		private_data, struct notifyd_state);
 	struct server_id_buf idbuf;
 	struct messaging_rec *rec = *prec;
-	struct messaging_rec **tmp;
-	struct messaging_reclog *log;
 	struct notify_rec_change_msg *msg;
 	size_t pathlen;
 	bool ok;
@@ -581,6 +596,13 @@ static bool notifyd_rec_change(struct messaging_context *msg_ctx,
 	if ((state->log == NULL) || (state->ctdbd_conn == NULL)) {
 		return true;
 	}
+
+#ifdef CLUSTER_SUPPORT
+	{
+
+	struct messaging_rec **tmp;
+	struct messaging_reclog *log;
+
 	log = state->log;
 
 	tmp = talloc_realloc(log, log->recs, struct messaging_rec *,
@@ -602,6 +624,9 @@ static bool notifyd_rec_change(struct messaging_context *msg_ctx,
 					 messaging_server_id(msg_ctx), log);
 	}
 
+	}
+#endif
+
 	return true;
 }
 
@@ -938,6 +963,8 @@ static bool notifyd_got_db(struct messaging_context *msg_ctx,
 	return true;
 }
 
+#ifdef CLUSTER_SUPPORT
+
 static void notifyd_broadcast_reclog(struct ctdbd_connection *ctdbd_conn,
 				     struct server_id src,
 				     struct messaging_reclog *log)
@@ -1139,6 +1166,8 @@ static int notifyd_clean_peers_recv(struct tevent_req *req)
 	return tevent_req_simple_recv_unix(req);
 }
 
+#endif
+
 static int notifyd_add_proxy_syswatches(struct db_record *rec,
 					void *private_data)
 {
@@ -1184,6 +1213,8 @@ static int notifyd_add_proxy_syswatches(struct db_record *rec,
 	return 0;
 }
 
+#ifdef CLUSTER_SUPPORT
+
 static int notifyd_db_del_syswatches(struct db_record *rec, void *private_data)
 {
 	TDB_DATA key = dbwrap_record_get_key(rec);
@@ -1418,6 +1449,7 @@ static int notifyd_snoop_broadcast(uint32_t src_vnn, uint32_t dst_vnn,
 
 	return 0;
 }
+#endif
 
 struct notifyd_parse_db_state {
 	bool (*fn)(const char *path,
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 5fa0885..de0bf24 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -48,9 +48,12 @@
 #include "lib/smbd_shim.h"
 #include "scavenger.h"
 #include "locking/leases_db.h"
-#include "../../ctdb/include/ctdb_protocol.h"
 #include "smbd/notifyd/notifyd.h"
 
+#ifdef CLUSTER_SUPPORT
+#include "ctdb_protocol.h"
+#endif
+
 struct smbd_open_socket;
 struct smbd_child_pid;
 
@@ -265,6 +268,7 @@ static void smbd_parent_id_cache_delete(struct messaging_context *ctx,
 	messaging_send_to_children(ctx, msg_type, msg_data);
 }
 
+#ifdef CLUSTER_SUPPORT
 static int smbd_parent_ctdb_reconfigured(
 	uint32_t src_vnn, uint32_t dst_vnn, uint64_t dst_srvid,
 	const uint8_t *msg, size_t msglen, void *private_data)
@@ -284,6 +288,7 @@ static int smbd_parent_ctdb_reconfigured(
 
 	return 0;
 }
+#endif
 
 static void add_child_pid(struct smbd_parent_context *parent,
 			  pid_t pid)
@@ -906,6 +911,7 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
 	messaging_register(msg_ctx, NULL,
 			   ID_CACHE_KILL, smbd_parent_id_cache_kill);
 
+#ifdef CLUSTER_SUPPORT
 	if (lp_clustering()) {
 		struct ctdbd_connection *conn = messaging_ctdbd_connection();
 
@@ -914,6 +920,7 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
 		register_with_ctdbd(conn, CTDB_SRVID_SAMBA_NOTIFY,
 				    smbd_parent_ctdb_reconfigured, msg_ctx);
 	}
+#endif
 
 #ifdef DEVELOPER
 	messaging_register(msg_ctx, NULL, MSG_SMB_INJECT_FAULT,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list