set_string(c->instance, REALM_SZ, creds.server[2]);
c->ticket_st.length = creds.ticket.length;
- bcopy(creds.ticket.data,
- c->ticket_st.dat,
- min(c->ticket_st.length, MAX_KTXT_LEN));
+ memcpy(c->ticket_st.dat,
+ creds.ticket.data,
+ min(c->ticket_st.length, MAX_KTXT_LEN));
c->ticket_st.mbz = 0;
- bcopy(creds.keyblock.contents,
- (char*)c->session, sizeof(C_Block));
+ memcpy((char*)c->session, creds.keyblock.contents, sizeof(C_Block));
c->issue_date = creds.times.starttime;
c->lifetime = creds.times.endtime;
raddr.length = 4;
raddr.contents = (krb5_octet *)ra;
- bcopy((char *)&sender->sin_addr, sa, 4);
- bcopy((char *)&receiver->sin_addr, ra, 4);
+ memcpy(sa, (char *)&sender->sin_addr, 4);
+ memcpy(ra, (char *)&receiver->sin_addr, 4);
sfaddr.address = &saddr;
sfaddr.port = sender->sin_port;
return(-1);
}
- bcopy(out5.data, out, out5.length);
+ memcpy(out, out5.data, out5.length);
free(out5.data);
return(out5.length);
}
return(KFAILURE);
}
authent->length = outbuf.length;
- bcopy((char *)outbuf.data, (char *)authent->dat, outbuf.length);
+ memcpy((char *)authent->dat, (char *)outbuf.data, outbuf.length);
free((char *)outbuf.data);
}
return(krb425error(r));
raddr.length = 4;
raddr.contents = (krb5_octet *)ra;
- bcopy((char *)&sender->sin_addr, sa, 4);
- bcopy((char *)&receiver->sin_addr, ra, 4);
+ memcpy(sa, (char *)&sender->sin_addr, sa, 4);
+ memcpy(ra, (char *)&receiver->sin_addr, 4);
sfaddr.address = &saddr;
sfaddr.port = sender->sin_port;
return(-1);
}
- bcopy(out5.data, out, out5.length);
+ memcpy(out, out5.data, out5.length);
free(out5.data);
return(out5.length);
}
raddr.length = 4;
raddr.contents = (krb5_octet *)ra;
- bcopy((char *)&sender->sin_addr, sa, 4);
- bcopy((char *)&receiver->sin_addr, ra, 4);
+ memcpy(sa, (char *)&sender->sin_addr, 4);
+ memcpy(ra, (char *)&receiver->sin_addr, 4);
sfaddr.address = &saddr;
sfaddr.port = sender->sin_port;
peer.addrtype = ADDRTYPE_INET;
peer.length = 4;
peer.contents = (krb5_octet *)addr;
- bcopy((char *)&from_addr + (sizeof(from_addr) - 4), addr, 4);
+ memcpy(addr, (char *)&from_addr + (sizeof(from_addr) - 4), 4);
}
if (!_krb425_local_realm[0])
r = KFAILURE;
goto out;
} else
- bcopy(authd.ticket->enc_part2->session->contents,
- (char*)ad->session, sizeof(C_Block));
+ memcpy((char*)ad->session,
+ authd.ticket->enc_part2->session->contents,
+ sizeof(C_Block));
ad->life = authd.ticket->enc_part2->times.endtime;
ad->time_sec = authd.authenticator->ctime;
r = KFAILURE;
goto out;
} else
- bcopy(authd.ticket->enc_part2->caddrs[0]->contents,
- (char *)&ad->address + sizeof(ad->address) - 4, 4);
+ memcpy((char *)&ad->address + sizeof(ad->address) - 4,
+ authd.ticket->enc_part2->caddrs[0]->contents, 4);
if (authd.ticket->enc_part2->authorization_data &&
authd.ticket->enc_part2->authorization_data[0]) {
ad->reply.length = authd.ticket->enc_part2->authorization_data[0]->length;
- bcopy(authd.ticket->enc_part2->authorization_data[0]->contents,
- ad->reply.dat,
- min(ad->reply.length, MAX_KTXT_LEN));
+ memcpy(ad->reply.dat,
+ authd.ticket->enc_part2->authorization_data[0]->contents,
+ min(ad->reply.length, MAX_KTXT_LEN));
ad->reply.mbz = 0;
}
out:
raddr.length = 4;
raddr.contents = (krb5_octet *)ra;
- bcopy((char *)&sender->sin_addr, sa, 4);
- bcopy((char *)&receiver->sin_addr, ra, 4);
+ memcpy(sa, (char *)&sender->sin_addr, 4);
+ memcpy(ra, (char *)&receiver->sin_addr, 4);
sfaddr.address = &saddr;
sfaddr.port = sender->sin_port;
old_vers = 1;
/* copy what we have read into tmp_buf */
- (void) bcopy(krb_vers, (char *) tmp_buf, KRB_SENDAUTH_VLEN);
+ (void) memcpy((char *) tmp_buf, krb_vers, KRB_SENDAUTH_VLEN);
/* search for space, and make it a null */
for (i = 0; i < KRB_SENDAUTH_VLEN; i++)
}
ticket->length = tkt_len;
/* copy the ticket into the struct */
- (void) bcopy(cp, (char *) ticket->dat, ticket->length);
+ (void) memcpy((char *) ticket->dat, cp, ticket->length);
} else {
/* read the application version string */
return(cc);
/* zero the buffer */
- (void) bzero(buf, BUFSIZ);
+ (void) memset(buf, 0, BUFSIZ);
/* insert version strings */
(void) strncpy(buf, KRB_SENDAUTH_VERS, KRB_SENDAUTH_VLEN);
/* put ticket length into buffer */
tkt_len = htonl((unsigned long) ticket->length);
- (void) bcopy((char *) &tkt_len, buf+i, sizeof(tkt_len));
+ (void) memcpy(buf+i, (char *) &tkt_len, sizeof(tkt_len));
i += sizeof(tkt_len);
/* put ticket into buffer */
- (void) bcopy((char *) ticket->dat, buf+i, ticket->length);
+ (void) memcpy(buf+i, (char *) ticket->dat, ticket->length);
i += ticket->length;
/* write the request to the server */
return(cc);
/* fetch the (modified) checksum */
- (void) bcopy((char *)msg_data->app_data, (char *)&cksum,
- sizeof(cksum));
+ (void) memcpy((char *)&cksum, (char *)msg_data->app_data,
+ sizeof(cksum));
cksum = ntohl(cksum);
/* if it doesn't match, fail */
}
keyblock.length = 8;
keyblock.keytype = KEYTYPE_DES;
- bcopy(key, keyblock.contents,8);
+ memcpy(keyblock.contents, key, 8);
}
return(KSUCCESS);
}