summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/krb425/get_cred.c9
-rw-r--r--src/lib/krb425/mk_priv.c6
-rw-r--r--src/lib/krb425/mk_req.c2
-rw-r--r--src/lib/krb425/mk_safe.c6
-rw-r--r--src/lib/krb425/rd_priv.c4
-rw-r--r--src/lib/krb425/rd_req.c17
-rw-r--r--src/lib/krb425/rd_safe.c4
-rw-r--r--src/lib/krb425/recvauth.c4
-rw-r--r--src/lib/krb425/sendauth.c10
-rw-r--r--src/lib/krb425/set_key.c2
10 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/krb425/get_cred.c b/src/lib/krb425/get_cred.c
index 21b3d31f8..03fef28df 100644
--- a/src/lib/krb425/get_cred.c
+++ b/src/lib/krb425/get_cred.c
@@ -86,13 +86,12 @@ CREDENTIALS *c;
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;
diff --git a/src/lib/krb425/mk_priv.c b/src/lib/krb425/mk_priv.c
index 9adc184d1..84372c8a3 100644
--- a/src/lib/krb425/mk_priv.c
+++ b/src/lib/krb425/mk_priv.c
@@ -50,8 +50,8 @@ struct sockaddr_in *receiver;
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;
@@ -73,7 +73,7 @@ struct sockaddr_in *receiver;
return(-1);
}
- bcopy(out5.data, out, out5.length);
+ memcpy(out, out5.data, out5.length);
free(out5.data);
return(out5.length);
}
diff --git a/src/lib/krb425/mk_req.c b/src/lib/krb425/mk_req.c
index 755bfd85f..30ec9daf2 100644
--- a/src/lib/krb425/mk_req.c
+++ b/src/lib/krb425/mk_req.c
@@ -72,7 +72,7 @@ u_long checksum;
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));
diff --git a/src/lib/krb425/mk_safe.c b/src/lib/krb425/mk_safe.c
index 2a2fc66d1..59cda7679 100644
--- a/src/lib/krb425/mk_safe.c
+++ b/src/lib/krb425/mk_safe.c
@@ -49,8 +49,8 @@ struct sockaddr_in *receiver;
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;
@@ -72,7 +72,7 @@ struct sockaddr_in *receiver;
return(-1);
}
- bcopy(out5.data, out, out5.length);
+ memcpy(out, out5.data, out5.length);
free(out5.data);
return(out5.length);
}
diff --git a/src/lib/krb425/rd_priv.c b/src/lib/krb425/rd_priv.c
index cda7f5e25..0b4af57f5 100644
--- a/src/lib/krb425/rd_priv.c
+++ b/src/lib/krb425/rd_priv.c
@@ -50,8 +50,8 @@ MSG_DAT *msg;
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;
diff --git a/src/lib/krb425/rd_req.c b/src/lib/krb425/rd_req.c
index ad62f2add..05b949ded 100644
--- a/src/lib/krb425/rd_req.c
+++ b/src/lib/krb425/rd_req.c
@@ -41,7 +41,7 @@ char *fn;
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])
@@ -143,8 +143,9 @@ char *fn;
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;
@@ -154,15 +155,15 @@ char *fn;
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:
diff --git a/src/lib/krb425/rd_safe.c b/src/lib/krb425/rd_safe.c
index d2f55c609..9b50aabeb 100644
--- a/src/lib/krb425/rd_safe.c
+++ b/src/lib/krb425/rd_safe.c
@@ -49,8 +49,8 @@ MSG_DAT *msg;
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;
diff --git a/src/lib/krb425/recvauth.c b/src/lib/krb425/recvauth.c
index 1cee4884f..321c46170 100644
--- a/src/lib/krb425/recvauth.c
+++ b/src/lib/krb425/recvauth.c
@@ -146,7 +146,7 @@ char *version; /* version string (filled in) */
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++)
@@ -191,7 +191,7 @@ char *version; /* version string (filled in) */
}
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 */
diff --git a/src/lib/krb425/sendauth.c b/src/lib/krb425/sendauth.c
index 9c050104e..0a5394500 100644
--- a/src/lib/krb425/sendauth.c
+++ b/src/lib/krb425/sendauth.c
@@ -161,7 +161,7 @@ char *version; /* 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);
@@ -172,11 +172,11 @@ char *version; /* version string */
/* 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 */
@@ -214,8 +214,8 @@ char *version; /* version string */
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 */
diff --git a/src/lib/krb425/set_key.c b/src/lib/krb425/set_key.c
index 8c4a70d86..4589f7b8d 100644
--- a/src/lib/krb425/set_key.c
+++ b/src/lib/krb425/set_key.c
@@ -36,7 +36,7 @@ int cvt;
}
keyblock.length = 8;
keyblock.keytype = KEYTYPE_DES;
- bcopy(key, keyblock.contents,8);
+ memcpy(keyblock.contents, key, 8);
}
return(KSUCCESS);
}