The branch, master has been updated
       via  b8f7f42 ctdb: Remove double sanity checks from ctdb_tcp_read_cb
       via  c42c721 ctdb: Remove double sanity checks from ctdb_daemon_read_cb
      from  f2df0e5 krb5_wrap: Fix CID 1414755 Resource leak

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


- Log -----------------------------------------------------------------
commit b8f7f42565d35e20ba576db101bd5eb27f90e903
Author: Swen Schillig <[email protected]>
Date:   Tue Mar 13 09:22:45 2018 +0100

    ctdb: Remove double sanity checks from ctdb_tcp_read_cb
    
    Within ctdb_tcp_read_cb the provided data is checked for sanity,
    e.g. correct size and content. This is not required because it was
    done already by the caller(queue_process).
    
    Signed-off-by: Swen Schillig <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Martin Schwenke <[email protected]>
    Autobuild-Date(master): Wed Apr  4 09:31:04 CEST 2018 on sn-devel-144

commit c42c721b980d87588513751c12f8bb9f88e28cd5
Author: Swen Schillig <[email protected]>
Date:   Tue Mar 13 08:57:40 2018 +0100

    ctdb: Remove double sanity checks from ctdb_daemon_read_cb
    
    Within ctdb_daemon_read_cb the provided data is checked for sanity,
    e.g. correct size and content. This is not required because it was
    done already by the caller (queue_process).
    
    Signed-off-by: Swen Schillig <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

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

Summary of changes:
 ctdb/server/ctdb_daemon.c | 5 -----
 ctdb/tcp/tcp_io.c         | 7 -------
 2 files changed, 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 6d2f70f..3b06972 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -895,11 +895,6 @@ static void ctdb_daemon_read_cb(uint8_t *data, size_t cnt, 
void *args)
                return;
        }
        hdr = (struct ctdb_req_header *)data;
-       if (cnt != hdr->length) {
-               ctdb_set_error(client->ctdb, "Bad header length %u expected 
%u\n in daemon", 
-                              (unsigned)hdr->length, (unsigned)cnt);
-               return;
-       }
 
        if (hdr->ctdb_magic != CTDB_MAGIC) {
                ctdb_set_error(client->ctdb, "Non CTDB packet rejected\n");
diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c
index 3c3b1c1..0eb8e25 100644
--- a/ctdb/tcp/tcp_io.c
+++ b/ctdb/tcp/tcp_io.c
@@ -56,13 +56,6 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
                goto failed;
        }
 
-
-       if (cnt != hdr->length) {
-               DEBUG(DEBUG_ALERT,(__location__ " Bad header length %u expected 
%u\n", 
-                        (unsigned)hdr->length, (unsigned)cnt));
-               goto failed;
-       }
-
        if (hdr->ctdb_magic != CTDB_MAGIC) {
                DEBUG(DEBUG_ALERT,(__location__ " Non CTDB packet 0x%x 
rejected\n", 
                         hdr->ctdb_magic));


-- 
Samba Shared Repository

Reply via email to