#undef cleanup
#define cleanup() {krb5_db_free_principal(&client, 1); \
krb5_db_free_principal(&server, 1); \
- bzero((char *)session_key->contents, session_key->length); \
+ memset((char *)session_key->contents, 0, \
+ session_key->length); \
free((char *)session_key->contents); \
session_key->contents = 0; }
return retval;
}
retval = krb5_encrypt_tkt_part(&encrypting_key, &ticket_reply);
- bzero((char *)encrypting_key.contents, encrypting_key.length);
+ memset((char *)encrypting_key.contents, 0, encrypting_key.length);
free((char *)encrypting_key.contents);
if (retval) {
cleanup();
#undef cleanup
#define cleanup() {krb5_db_free_principal(&client, 1); \
- bzero((char *)session_key->contents, session_key->length); \
+ memset((char *)session_key->contents, 0, \
+ session_key->length); \
free((char *)session_key->contents); \
session_key->contents = 0; \
- bzero(ticket_reply.enc_part.ciphertext.data, \
+ memset(ticket_reply.enc_part.ciphertext.data, 0, \
ticket_reply.enc_part.ciphertext.length); \
free(ticket_reply.enc_part.ciphertext.data);}
}
retval = krb5_encode_kdc_rep(KRB5_AS_REP, &reply_encpart,
&encrypting_key, &reply, response);
- bzero((char *)encrypting_key.contents, encrypting_key.length);
+ memset((char *)encrypting_key.contents, 0, encrypting_key.length);
free((char *)encrypting_key.contents);
cleanup();
return retval;
#undef cleanup
#define cleanup() { krb5_free_ticket(header_ticket); \
krb5_db_free_principal(&server, 1); \
- bzero((char *)session_key->contents, session_key->length); \
+ memset((char *)session_key->contents, 0, \
+ session_key->length); \
free((char *)session_key->contents); \
session_key->contents = 0; }
#undef cleanup
#define cleanup() { krb5_free_ticket(header_ticket); \
krb5_db_free_principal(&server, 1); \
- bzero((char *)session_key->contents, session_key->length); \
+ memset((char *)session_key->contents, 0, \
+ session_key->length); \
free((char *)session_key->contents); \
session_key->contents = 0; \
if (newtransited) free(enc_tkt_reply.transited.data);}
retval = krb5_encrypt_tkt_part(&encrypting_key, &ticket_reply);
- bzero((char *)encrypting_key.contents, encrypting_key.length);
+ memset((char *)encrypting_key.contents, 0, encrypting_key.length);
free((char *)encrypting_key.contents);
if (retval) {
retval = krb5_encode_kdc_rep(KRB5_TGS_REP, &reply_encpart,
header_ticket->enc_part2->session,
&reply, response);
- bzero((char *)session_key->contents, session_key->length);
+ memset((char *)session_key->contents, 0, session_key->length);
free((char *)session_key->contents);
session_key->contents = 0;
return retval;
0, /* no replay cache */
&authdat);
krb5_db_free_principal(&server, nprincs);
- bzero((char *)encrypting_key.contents, encrypting_key.length);
+ memset((char *)encrypting_key.contents, 0, encrypting_key.length);
free((char *)encrypting_key.contents);
if (retval) {
cleanup_apreq();
/* clean up master key stuff */
retval = krb5_finish_key(&master_encblock);
- bzero((char *)&master_encblock, sizeof(master_encblock));
+ memset((char *)&master_encblock, 0, sizeof(master_encblock));
/* close database */
if (retval) {
com_err(prog, 0, "Cannot create server socket");
return retval;
}
- bzero((char *)&sin, sizeof(sin));
+ memset((char *)&sin, 0, sizeof(sin));
sin.sin_port = sp->s_port;
if (bind(udp_port_fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
retval = errno;