/*
- * $Id: wccp2.cc,v 1.7 2006/08/20 19:15:32 serassio Exp $
+ * $Id: wccp2.cc,v 1.8 2006/09/15 20:49:49 serassio Exp $
*
* DEBUG: section 80 WCCP Support
* AUTHOR: Steven Wilton
wccp2_update_service(wccp2_service_list_ptr, service, service_id,
service_priority, service_proto, service_flags, ports);
wccp2_service_list_ptr->wccp2_security_type = security_type;
- bzero(wccp2_service_list_ptr->wccp_password, WCCP2_PASSWORD_LEN + 1);
+ memset(wccp2_service_list_ptr->wccp_password, 0, WCCP2_PASSWORD_LEN + 1);
strncpy(wccp2_service_list_ptr->wccp_password, password, WCCP2_PASSWORD_LEN);
/* add to linked list - XXX this should use the Squid dlink* routines! */
wccp2_service_list_ptr->next = wccp2_service_list_head;
debug(80, 5) ("wccp2_update_md5_security: called\n");
/* The password field, for the MD5 hash, needs to be 8 bytes and NUL padded. */
- bzero(pwd, sizeof(pwd));
+ memset(pwd, 0, sizeof(pwd));
strncpy(pwd, password, sizeof(pwd));
ws = (struct wccp2_security_md5_t *) ptr;
* area should be zero'ed before calculating the MD5 hash.
*/
/* XXX eventually we should be able to kill md5_digest and blit it directly in */
- bzero(ws->security_implementation, sizeof(ws->security_implementation));
+ memset(ws->security_implementation, 0, sizeof(ws->security_implementation));
MD5Init(&M);
/* If execution makes it here then we have an MD5 security */
/* The password field, for the MD5 hash, needs to be 8 bytes and NUL padded. */
- bzero(pwd, sizeof(pwd));
+ memset(pwd, 0, sizeof(pwd));
strncpy(pwd, srv->wccp_password, sizeof(pwd));
/* Take a copy of the challenge: we need to NUL it before comparing */
memcpy(md5_challenge, ws->security_implementation, 16);
- bzero(ws->security_implementation, sizeof(ws->security_implementation));
+ memset(ws->security_implementation, 0, sizeof(ws->security_implementation));
MD5Init(&M);
}
debug(80, 5) ("parse_wccp2_service_info: called\n");
- bzero(portlist, sizeof(portlist));
+ memset(portlist, 0, sizeof(portlist));
/* First argument: id */
service_id = GetInteger();