--------------------- PatchSet 1152 Date: 2001/01/07 07:56:15 Author: hno Branch: auth_rewrite Tag: (none) Log: const * fixes Members: ntlm_auth_modules/NTLMSSP/libntlmssp.c:1.1.2.12.2.6->1.1.2.12.2.7 ntlm_auth_modules/NTLMSSP/ntlm.h:1.1.2.12.2.6->1.1.2.12.2.7 ntlm_auth_modules/NTLMSSP/ntlm_auth.c:1.1.2.10.2.6->1.1.2.10.2.7 Index: squid/ntlm_auth_modules/NTLMSSP/libntlmssp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/Attic/libntlmssp.c,v retrieving revision 1.1.2.12.2.6 retrieving revision 1.1.2.12.2.7 diff -u -r1.1.2.12.2.6 -r1.1.2.12.2.7 --- squid/ntlm_auth_modules/NTLMSSP/libntlmssp.c 7 Jan 2001 02:49:31 -0000 1.1.2.12.2.6 +++ squid/ntlm_auth_modules/NTLMSSP/libntlmssp.c 7 Jan 2001 07:56:15 -0000 1.1.2.12.2.7 @@ -129,11 +129,11 @@ return 0; } -char *make_challenge (char *domain, char *domain_controller) { +const char *make_challenge (char *domain, char *domain_controller) { if (init_challenge(domain,domain_controller) > 0) return NULL; return ntlm_make_challenge(domain, domain_controller,challenge, - NONCE_LEN); + NONCE_LEN); } #define min(A,B) (Astatus == DC_OK) { ch=make_challenge(current_dc->domain,current_dc->controller); @@ -181,13 +181,16 @@ void manage_request () { ntlmhdr *fast_header; char buf[10240]; - char *ch, *decoded, *cred; + const char *ch; + char *ch2, *decoded, *cred; int plen; if(fgets(buf, BUFFER_SIZE, stdin) == NULL) exit(0); /* BIIG buffer */ - ch=memchr(buf,'\n', BUFFER_SIZE); /* safer against overrun than strchr */ - if (ch) - *ch='\0'; /* terminate the string at newline. */ + ch2=memchr(buf,'\n', BUFFER_SIZE); /* safer against overrun than strchr */ + if (ch2) { + *ch2='\0'; /* terminate the string at newline. */ + ch = ch2; + } debug("ntlm authenticator. Got '%s' from Squid\n",buf); if (memcmp(buf,"KK ",3)==0) { /* authenticate-request */