From 8d59d69449c2a86c478699a50d920541aa106201 Mon Sep 17 00:00:00 2001 From: Julien Chaffraix Date: Sat, 13 Nov 2010 12:01:33 -0800 Subject: security: tighten enum protection_level usage. While changing Curl_sec_read_msg to accept an enum protection_level instead of an int, I went ahead and fixed the usage of the associated fields. Some code was assuming that prot_clear == 0. Fixed those to use the proper value. Added assertions prior to any code that would set the protection level. --- lib/url.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index fb5122d65..3f9bfa877 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3541,6 +3541,10 @@ static struct connectdata *allocate_conn(struct SessionHandle *data) !conn->done_pipe) goto error; +#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI) + conn->data_prot = prot_clear; +#endif + return conn; error: Curl_llist_destroy(conn->send_pipe, NULL); -- cgit v1.2.3