summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-10 00:26:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:59 -0500
commit5d5b462bbb672c1897d24717af42cdd49ee49519 (patch)
tree99b34c26e2126e14f52bd750940acaaec8a3ffa9
parenta9d0bf80459a574ac261a635ee9f68caf0e5f3b0 (diff)
downloadsamba-5d5b462bbb672c1897d24717af42cdd49ee49519.tar.gz
samba-5d5b462bbb672c1897d24717af42cdd49ee49519.tar.bz2
samba-5d5b462bbb672c1897d24717af42cdd49ee49519.zip
r11619: use the 32 bit length helper in the kdc.
(This used to be commit 24f20eed0e242aab76ce8f0f8db7266ddc9ec97b)
-rw-r--r--source4/kdc/kdc.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 1139815ff4..a79dc8457e 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -199,28 +199,6 @@ static void kdc_tcp_terminate_connection(struct kdc_tcp_connection *kdcconn, con
stream_terminate_connection(kdcconn->conn, reason);
}
-
-/*
- work out if a tcp packet is complete
-*/
-NTSTATUS kdc_tcp_is_complete(void *private, DATA_BLOB blob, size_t *size)
-{
- if (blob.length < 4) {
- return STATUS_MORE_ENTRIES;
- }
- *size = 4 + RIVAL(blob.data, 0);
- if (*size > blob.length) {
- return STATUS_MORE_ENTRIES;
- }
- if ((*size) & (1 << 31)) {
- /* NOTE: we should send a 'KRB_ERR_FIELD_TOOLONG' and terminate,
- but for now we just terminate */
- return NT_STATUS_PORT_MESSAGE_TOO_LONG;
- }
- return NT_STATUS_OK;
-}
-
-
/*
receive a full packet on a KDC connection
*/
@@ -379,7 +357,7 @@ static void kdc_tcp_accept(struct stream_connection *conn)
packet_set_private(kdcconn->packet, kdcconn);
packet_set_socket(kdcconn->packet, conn->socket);
packet_set_callback(kdcconn->packet, kdc_tcp_recv);
- packet_set_full_request(kdcconn->packet, kdc_tcp_is_complete);
+ packet_set_full_request(kdcconn->packet, packet_full_request_u32);
packet_set_error_handler(kdcconn->packet, kdc_tcp_recv_error);
packet_set_event_context(kdcconn->packet, conn->event.ctx);
packet_set_serialise(kdcconn->packet, conn->event.fde);