[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Feb 15 23:57:02 UTC 2018


The branch, master has been updated
       via  f8313d7 winbind: Don't send "server_id" explicitly for DUMP_DOMAIN_LIST
       via  0e3c2c8 winbind: Don't explicitly send "server_id" for ONLINESTATUS
      from  9952eda repl_metadata: Avoid silent skipping an object during DRS (due to RODC rename collisions)

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


- Log -----------------------------------------------------------------
commit f8313d715b073a36b95c09f40c1f2dfc9bf7d5b6
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Feb 13 14:05:43 2018 +0100

    winbind: Don't send "server_id" explicitly for DUMP_DOMAIN_LIST
    
    messaging already provides the sender id
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Feb 16 00:56:36 CET 2018 on sn-devel-144

commit 0e3c2c8bc66d747e0eb8e7c1736268f7fd0b0d7a
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Feb 13 14:05:15 2018 +0100

    winbind: Don't explicitly send "server_id" for ONLINESTATUS
    
    Messaging already provides the sender id
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 source3/utils/smbcontrol.c       | 26 +++-----------------------
 source3/winbindd/winbindd_dual.c | 27 +++++----------------------
 2 files changed, 8 insertions(+), 45 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 0f6dacc..c4b5630 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -1160,10 +1160,6 @@ static bool do_winbind_onlinestatus(struct tevent_context *ev_ctx,
 				    const struct server_id pid,
 				    const int argc, const char **argv)
 {
-	struct server_id myid;
-
-	myid = messaging_server_id(msg_ctx);
-
 	if (argc != 1) {
 		fprintf(stderr, "Usage: smbcontrol winbindd onlinestatus\n");
 		return False;
@@ -1172,9 +1168,9 @@ static bool do_winbind_onlinestatus(struct tevent_context *ev_ctx,
 	messaging_register(msg_ctx, NULL, MSG_WINBIND_ONLINESTATUS,
 			   print_pid_string_cb);
 
-	if (!send_message(msg_ctx, pid, MSG_WINBIND_ONLINESTATUS, &myid,
-			  sizeof(myid)))
+	if (!send_message(msg_ctx, pid, MSG_WINBIND_ONLINESTATUS, NULL, 0)) {
 		return False;
+	}
 
 	wait_replies(ev_ctx, msg_ctx, procid_to_pid(&pid) == 0);
 
@@ -1208,11 +1204,6 @@ static bool do_winbind_dump_domain_list(struct tevent_context *ev_ctx,
 {
 	const char *domain = NULL;
 	int domain_len = 0;
-	struct server_id myid;
-	uint8_t *buf = NULL;
-	int buf_len = 0;
-
-	myid = messaging_server_id(msg_ctx);
 
 	if (argc < 1 || argc > 2) {
 		fprintf(stderr, "Usage: smbcontrol <dest> dump-domain-list "
@@ -1228,19 +1219,9 @@ static bool do_winbind_dump_domain_list(struct tevent_context *ev_ctx,
 	messaging_register(msg_ctx, NULL, MSG_WINBIND_DUMP_DOMAIN_LIST,
 			   print_pid_string_cb);
 
-	buf_len = sizeof(myid)+domain_len;
-	buf = SMB_MALLOC_ARRAY(uint8_t, buf_len);
-	if (!buf) {
-		return false;
-	}
-
-	memcpy(buf, &myid, sizeof(myid));
-	memcpy(&buf[sizeof(myid)], domain, domain_len);
-
 	if (!send_message(msg_ctx, pid, MSG_WINBIND_DUMP_DOMAIN_LIST,
-			  buf, buf_len))
+			  domain, domain_len))
 	{
-		SAFE_FREE(buf);
 		return false;
 	}
 
@@ -1248,7 +1229,6 @@ static bool do_winbind_dump_domain_list(struct tevent_context *ev_ctx,
 
 	/* No replies were received within the timeout period */
 
-	SAFE_FREE(buf);
 	if (num_replies == 0) {
 		printf("No replies received\n");
 	}
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 993166d..7fb5aa8 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -796,16 +796,9 @@ void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
 {
 	TALLOC_CTX *mem_ctx;
 	const char *message;
-	struct server_id *sender;
 
 	DEBUG(5,("winbind_msg_onlinestatus received.\n"));
 
-	if (!data->data) {
-		return;
-	}
-
-	sender = (struct server_id *)data->data;
-
 	mem_ctx = talloc_init("winbind_msg_onlinestatus");
 	if (mem_ctx == NULL) {
 		return;
@@ -817,7 +810,7 @@ void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
 		return;
 	}
 
-	messaging_send_buf(msg_ctx, *sender, MSG_WINBIND_ONLINESTATUS, 
+	messaging_send_buf(msg_ctx, server_id, MSG_WINBIND_ONLINESTATUS,
 			   (const uint8_t *)message, strlen(message) + 1);
 
 	talloc_destroy(mem_ctx);
@@ -855,7 +848,6 @@ void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
 {
 	TALLOC_CTX *mem_ctx;
 	const char *message = NULL;
-	struct server_id *sender = NULL;
 	const char *domain = NULL;
 	char *s = NULL;
 	NTSTATUS status;
@@ -863,22 +855,13 @@ void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
 
 	DEBUG(5,("winbind_msg_dump_domain_list received.\n"));
 
-	if (!data || !data->data) {
-		return;
-	}
-
-	if (data->length < sizeof(struct server_id)) {
-		return;
-	}
-
 	mem_ctx = talloc_init("winbind_msg_dump_domain_list");
 	if (!mem_ctx) {
 		return;
 	}
 
-	sender = (struct server_id *)data->data;
-	if (data->length > sizeof(struct server_id)) {
-		domain = (const char *)data->data+sizeof(struct server_id);
+	if (data->length > 0) {
+		domain = (const char *)data->data;
 	}
 
 	if (domain) {
@@ -893,7 +876,7 @@ void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
 			return;
 		}
 
-		messaging_send_buf(msg_ctx, *sender,
+		messaging_send_buf(msg_ctx, server_id,
 				   MSG_WINBIND_DUMP_DOMAIN_LIST,
 				   (const uint8_t *)message, strlen(message) + 1);
 
@@ -918,7 +901,7 @@ void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
 		}
 	}
 
-	status = messaging_send_buf(msg_ctx, *sender,
+	status = messaging_send_buf(msg_ctx, server_id,
 				    MSG_WINBIND_DUMP_DOMAIN_LIST,
 				    (uint8_t *)s, strlen(s) + 1);
 	if (!NT_STATUS_IS_OK(status)) {


-- 
Samba Shared Repository



More information about the samba-cvs mailing list