From b291ac9e96550284145043a3e34398dc0b70e2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 10 Sep 2003 19:39:05 +0000 Subject: [PATCH] close socket when we are done, don't allow the server to restart gssapi negotiation git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12817 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/test/http_client.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/appl/test/http_client.c b/appl/test/http_client.c index cb0cde6a2..bcdf90b74 100644 --- a/appl/test/http_client.c +++ b/appl/test/http_client.c @@ -259,6 +259,7 @@ http_query(const char *host, const char *page, } else abort(); } + close(s); return 0; } @@ -268,7 +269,7 @@ main(int argc, char **argv) { struct http_req req; const char *host, *page; - int i, done, print_body, gssapi_done, debug_print = 0; + int i, done, print_body, gssapi_done, gssapi_started, debug_print = 0; char *headers[10]; /* XXX */ int num_headers; gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; @@ -303,6 +304,7 @@ main(int argc, char **argv) done = 0; num_headers = 0; gssapi_done = 1; + gssapi_started = 0; do { print_body = 0; @@ -362,6 +364,10 @@ main(int argc, char **argv) errx(1, "invalid base64 Negotiate token %s", &h[i]); input_token.length = len; } else { + if (gssapi_started) + errx(1, "Negotiate already started"); + gssapi_started = 1; + input_token.length = 0; input_token.value = NULL; }