--------------------- PatchSet 7145 Date: 2005/10/30 09:16:36 Author: serassio Branch: negotiate-nt-2_5 Tag: (none) Log: Imported changes from negotiate-2_5 Members: src/helper.c:1.16.10.23->1.16.10.23.2.1 src/auth/negotiate/auth_negotiate.c:1.1.6.2->1.1.6.3 src/auth/ntlm/auth_ntlm.c:1.18.2.1.4.24.2.2->1.18.2.1.4.24.2.3 Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/helper.c,v retrieving revision 1.16.10.23 retrieving revision 1.16.10.23.2.1 diff -u -r1.16.10.23 -r1.16.10.23.2.1 --- squid/src/helper.c 26 Mar 2005 09:48:39 -0000 1.16.10.23 +++ squid/src/helper.c 30 Oct 2005 09:16:36 -0000 1.16.10.23.2.1 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.16.10.23 2005/03/26 09:48:39 serassio Exp $ + * $Id: helper.c,v 1.16.10.23.2.1 2005/10/30 09:16:36 serassio Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -743,6 +743,8 @@ } else if ((t = strchr(srv->buf, '\n'))) { /* end of reply found */ debug(84, 3) ("helperHandleRead: end of reply found\n"); + if (t > srv->buf && t[-1] == '\r') + t[-1] = '\0'; *t = '\0'; srv->flags.busy = 0; srv->offset = 0; @@ -800,6 +802,8 @@ } else if ((t = strchr(srv->buf, '\n'))) { /* end of reply found */ debug(84, 3) ("helperStatefulHandleRead: end of reply found\n"); + if (t > srv->buf && t[-1] == '\r') + t[-1] = '\0'; *t = '\0'; srv->flags.busy = 0; srv->offset = 0; Index: squid/src/auth/negotiate/auth_negotiate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/negotiate/auth_negotiate.c,v retrieving revision 1.1.6.2 retrieving revision 1.1.6.3 diff -u -r1.1.6.2 -r1.1.6.3 --- squid/src/auth/negotiate/auth_negotiate.c 8 Oct 2005 09:24:12 -0000 1.1.6.2 +++ squid/src/auth/negotiate/auth_negotiate.c 30 Oct 2005 09:16:36 -0000 1.1.6.3 @@ -1,6 +1,6 @@ /* - * $Id: auth_negotiate.c,v 1.1.6.2 2005/10/08 09:24:12 serassio Exp $ + * $Id: auth_negotiate.c,v 1.1.6.3 2005/10/30 09:16:36 serassio Exp $ * * DEBUG: section 29 Negotiate Authenticator * AUTHOR: Robert Collins @@ -472,7 +472,7 @@ negotiate_request->server_blob = xstrdup(blob); negotiate_request->auth_state = AUTHENTICATE_STATE_NEGOTIATE; safe_free(auth_user_request->message); - auth_user_request->message = xstrdup("Authenication in progress"); + auth_user_request->message = xstrdup("Authentication in progress"); debug(29, 4) ("authenticateNegotiateHandleReply: Need to challenge the client with a server blob '%s'\n", blob); } else if (strncasecmp(reply, "AF ", 3) == 0 && arg != NULL) { /* we're finished, release the helper */ @@ -503,7 +503,7 @@ * Authenticate Negotiate start. * If after a KK deny the user's request w/ 407 and mark the helper as * Needing YR. */ - auth_user_request->message = xstrdup(reply); + auth_user_request->message = xstrdup(blob); negotiate_request->auth_state = AUTHENTICATE_STATE_FAILED; safe_free(negotiate_request->server_blob); authenticateNegotiateReleaseServer(negotiate_request); Index: squid/src/auth/ntlm/auth_ntlm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/auth_ntlm.c,v retrieving revision 1.18.2.1.4.24.2.2 retrieving revision 1.18.2.1.4.24.2.3 diff -u -r1.18.2.1.4.24.2.2 -r1.18.2.1.4.24.2.3 --- squid/src/auth/ntlm/auth_ntlm.c 9 Oct 2005 13:59:42 -0000 1.18.2.1.4.24.2.2 +++ squid/src/auth/ntlm/auth_ntlm.c 30 Oct 2005 09:16:36 -0000 1.18.2.1.4.24.2.3 @@ -434,8 +434,9 @@ /* seperate out the useful data */ blob = strchr(reply, ' '); - if (blob != NULL) - blob++; + if (blob) { + blob++; + } if (strncasecmp(reply, "TT ", 3) == 0 && blob != NULL) { /* we have been given a blob to send to the client */