summaryrefslogtreecommitdiffstats
path: root/secure/lib
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1995-07-20 11:40:06 +0000
committerpst <pst@FreeBSD.org>1995-07-20 11:40:06 +0000
commitd6b93135e2743f89332a3ea7f97d682dd40c7b85 (patch)
tree16908c200b05bff2e4532927f105621ae791d795 /secure/lib
parentb8e783516fe93f74be3f95b44fbeb5719a33d819 (diff)
downloadFreeBSD-src-d6b93135e2743f89332a3ea7f97d682dd40c7b85.zip
FreeBSD-src-d6b93135e2743f89332a3ea7f97d682dd40c7b85.tar.gz
Update telnet to the 95.05.31 release.
Obtained from: Dave Borman <dab@cray.com>
Diffstat (limited to 'secure/lib')
-rw-r--r--secure/lib/libtelnet/Makefile18
-rw-r--r--secure/lib/libtelnet/auth.c9
-rw-r--r--secure/lib/libtelnet/enc_des.c24
-rw-r--r--secure/lib/libtelnet/encrypt.c9
-rw-r--r--secure/lib/libtelnet/genget.c2
-rw-r--r--secure/lib/libtelnet/kerberos.c10
-rw-r--r--secure/lib/libtelnet/kerberos5.c26
-rw-r--r--secure/lib/libtelnet/krb4encpwd.c20
-rw-r--r--secure/lib/libtelnet/read_password.c18
-rw-r--r--secure/lib/libtelnet/rsaencpwd.c22
-rw-r--r--secure/lib/libtelnet/spx.c2
11 files changed, 90 insertions, 70 deletions
diff --git a/secure/lib/libtelnet/Makefile b/secure/lib/libtelnet/Makefile
index 90a0be8..9e7df0b 100644
--- a/secure/lib/libtelnet/Makefile
+++ b/secure/lib/libtelnet/Makefile
@@ -1,12 +1,26 @@
# From: @(#)Makefile 8.2 (Berkeley) 12/15/93
-# $Id: Makefile,v 1.2 1994/08/05 02:02:36 wollman Exp $
+# $Id: Makefile,v 1.1.1.1 1994/08/12 22:02:57 csgr Exp $
LIB= telnet
SRCS= auth.c encrypt.c genget.c getent.c misc.c
SRCS+= kerberos.c enc_des.c
-#SRCS+= kerberos5.c
+SRCS+= spx.c rsaencpwd.c read_password.c
CFLAGS+= -DHAS_CGETENT
+#ifdef ENCRYPTION
+CFLAGS+= -DENCRYPTION -DAUTHENTICATION
+
+.if exists(/usr/lib/libkrb.a)
+CFLAGS+= -DKRB4 -DKRB4_ENCPWD -DDES_ENCRYPTION -I/usr/include/kerberosIV
+SRCS+= krb4encpwd.c
+.endif
+
+.if exists(/usr/lib/libkrb5.a)
+CFLAGS+= -DKRB5 -DDES_ENCRYPTION -DFORWARD
+SRCS+= kerberos5.c forward.c
+.endif
+#endif /* ENCRYPTION */
+
# These are the sources that have encryption stuff in them.
CRYPT_SRC= auth.c enc-proto.h enc_des.c encrypt.c
CRYPT_SRC+= encrypt.h kerberos.c kerberos5.c krb4encpwd.c
diff --git a/secure/lib/libtelnet/auth.c b/secure/lib/libtelnet/auth.c
index 226a206..64f5ce9 100644
--- a/secure/lib/libtelnet/auth.c
+++ b/secure/lib/libtelnet/auth.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)auth.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)auth.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
/*
@@ -222,6 +222,9 @@ auth_init(name, server)
Name,
ap->type, ap->way);
}
+ else if (auth_debug_mode)
+ printf(">>>%s: Init failed: auth type %d %d\r\n",
+ Name, ap->type, ap->way);
++ap;
}
}
@@ -416,7 +419,7 @@ auth_send(data, cnt)
auth_send_cnt = cnt > sizeof(_auth_send_data)
? sizeof(_auth_send_data)
: cnt;
- bcopy((void *)data, (void *)_auth_send_data, auth_send_cnt);
+ memmove((void *)_auth_send_data, (void *)data, auth_send_cnt);
auth_send_data = _auth_send_data;
} else {
/*
@@ -542,7 +545,7 @@ auth_name(data, cnt)
Name, cnt, sizeof(savename)-1);
return;
}
- bcopy((void *)data, (void *)savename, cnt);
+ memmove((void *)savename, (void *)data, cnt);
savename[cnt] = '\0'; /* Null terminate */
if (auth_debug_mode)
printf(">>>%s: Got NAME [%s]\r\n", Name, savename);
diff --git a/secure/lib/libtelnet/enc_des.c b/secure/lib/libtelnet/enc_des.c
index 6f90520..d6886fd 100644
--- a/secure/lib/libtelnet/enc_des.c
+++ b/secure/lib/libtelnet/enc_des.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)enc_des.c 8.2 (Berkeley) 12/15/93";
+static char sccsid[] = "@(#)enc_des.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
#ifdef ENCRYPTION
@@ -143,7 +143,7 @@ ofb64_init(server)
fb64_init(fbp)
register struct fb *fbp;
{
- bzero((void *)fbp, sizeof(*fbp));
+ memset((void *)fbp, 0, sizeof(*fbp));
fbp->state[0] = fbp->state[1] = FAILED;
fbp->fb_feed[0] = IAC;
fbp->fb_feed[1] = SB;
@@ -374,7 +374,7 @@ fb64_reply(data, cnt, fbp)
break;
case FB64_IV_BAD:
- bzero(fbp->temp_feed, sizeof(Block));
+ memset(fbp->temp_feed, 0, sizeof(Block));
fb64_stream_iv(fbp->temp_feed, &fbp->streams[DIR_ENCRYPT-1]);
state = FAILED;
break;
@@ -422,7 +422,7 @@ fb64_session(key, server, fbp)
key ? key->type : -1, SK_DES);
return;
}
- bcopy((void *)key->data, (void *)fbp->krbdes_key, sizeof(Block));
+ memmove((void *)fbp->krbdes_key, (void *)key->data, sizeof(Block));
fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_ENCRYPT-1]);
fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_DECRYPT-1]);
@@ -549,8 +549,8 @@ fb64_stream_iv(seed, stp)
register struct stinfo *stp;
{
- bcopy((void *)seed, (void *)stp->str_iv, sizeof(Block));
- bcopy((void *)seed, (void *)stp->str_output, sizeof(Block));
+ memmove((void *)stp->str_iv, (void *)seed, sizeof(Block));
+ memmove((void *)stp->str_output, (void *)seed, sizeof(Block));
des_key_sched(stp->str_ikey, stp->str_sched);
@@ -562,10 +562,10 @@ fb64_stream_key(key, stp)
Block key;
register struct stinfo *stp;
{
- bcopy((void *)key, (void *)stp->str_ikey, sizeof(Block));
+ memmove((void *)stp->str_ikey, (void *)key, sizeof(Block));
des_key_sched(key, stp->str_sched);
- bcopy((void *)stp->str_iv, (void *)stp->str_output, sizeof(Block));
+ memmove((void *)stp->str_output, (void *)stp->str_iv, sizeof(Block));
stp->str_index = sizeof(Block);
}
@@ -605,7 +605,7 @@ cfb64_encrypt(s, c)
if (index == sizeof(Block)) {
Block b;
des_ecb_encrypt(stp->str_output, b, stp->str_sched, 1);
- bcopy((void *)b, (void *)stp->str_feed, sizeof(Block));
+ memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
index = 0;
}
@@ -639,7 +639,7 @@ cfb64_decrypt(data)
if (index == sizeof(Block)) {
Block b;
des_ecb_encrypt(stp->str_output, b, stp->str_sched, 1);
- bcopy((void *)b, (void *)stp->str_feed, sizeof(Block));
+ memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
index = 0; /* But now use 0 */
}
@@ -681,7 +681,7 @@ ofb64_encrypt(s, c)
if (index == sizeof(Block)) {
Block b;
des_ecb_encrypt(stp->str_feed, b, stp->str_sched, 1);
- bcopy((void *)b, (void *)stp->str_feed, sizeof(Block));
+ memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
index = 0;
}
*s++ ^= stp->str_feed[index];
@@ -712,7 +712,7 @@ ofb64_decrypt(data)
if (index == sizeof(Block)) {
Block b;
des_ecb_encrypt(stp->str_feed, b, stp->str_sched, 1);
- bcopy((void *)b, (void *)stp->str_feed, sizeof(Block));
+ memmove((void *)stp->str_feed, (void *)b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
index = 0; /* But now use 0 */
}
diff --git a/secure/lib/libtelnet/encrypt.c b/secure/lib/libtelnet/encrypt.c
index 1ced89b..432df0c 100644
--- a/secure/lib/libtelnet/encrypt.c
+++ b/secure/lib/libtelnet/encrypt.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)encrypt.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)encrypt.c 8.2 (Berkeley) 5/30/95";
#endif /* not lint */
/*
@@ -763,12 +763,13 @@ encrypt_keyid(kp, keyid, len)
if (ep->keyid)
(void)(*ep->keyid)(dir, kp->keyid, &kp->keylen);
- } else if ((len != kp->keylen) || (bcmp(keyid, kp->keyid, len) != 0)) {
+ } else if ((len != kp->keylen) ||
+ (memcmp(keyid, kp->keyid, len) != 0)) {
/*
* Length or contents are different
*/
kp->keylen = len;
- bcopy(keyid, kp->keyid, len);
+ memmove(kp->keyid, keyid, len);
if (ep->keyid)
(void)(*ep->keyid)(dir, kp->keyid, &kp->keylen);
} else {
@@ -795,7 +796,7 @@ encrypt_send_keyid(dir, keyid, keylen, saveit)
? ENCRYPT_ENC_KEYID : ENCRYPT_DEC_KEYID;
if (saveit) {
struct key_info *kp = &ki[(dir == DIR_ENCRYPT) ? 0 : 1];
- bcopy(keyid, kp->keyid, keylen);
+ memmove(kp->keyid, keyid, keylen);
kp->keylen = keylen;
}
diff --git a/secure/lib/libtelnet/genget.c b/secure/lib/libtelnet/genget.c
index a43579f..f87fcf0 100644
--- a/secure/lib/libtelnet/genget.c
+++ b/secure/lib/libtelnet/genget.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)genget.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)genget.c 8.2 (Berkeley) 5/30/95";
#endif /* not lint */
diff --git a/secure/lib/libtelnet/kerberos.c b/secure/lib/libtelnet/kerberos.c
index 5eef373..33599b9 100644
--- a/secure/lib/libtelnet/kerberos.c
+++ b/secure/lib/libtelnet/kerberos.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)kerberos.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)kerberos.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
/*
@@ -185,7 +185,7 @@ kerberos4_send(ap)
return(0);
}
- bzero(instance, sizeof(instance));
+ memset(instance, 0, sizeof(instance));
if (realm = krb_get_phost(RemoteHostName))
strncpy(instance, realm, sizeof(instance));
@@ -280,7 +280,7 @@ kerberos4_is(ap, data, cnt)
printf("No local realm\r\n");
return;
}
- bcopy((void *)data, (void *)auth.dat, auth.length = cnt);
+ memmove((void *)auth.dat, (void *)data, auth.length = cnt);
if (auth_debug_mode) {
printf("Got %d bytes of authentication data\r\n", cnt);
printf("CK: %d:", kerberos4_cksum(auth.dat, auth.length));
@@ -297,7 +297,7 @@ kerberos4_is(ap, data, cnt)
return;
}
#ifdef ENCRYPTION
- bcopy((void *)adat.session, (void *)session_key, sizeof(Block));
+ memmove((void *)session_key, (void *)adat.session, sizeof(Block));
#endif /* ENCRYPTION */
krb_kntoln(&adat, name);
@@ -329,7 +329,7 @@ kerberos4_is(ap, data, cnt)
*/
des_init_random_number_generator(session_key);
des_key_sched(session_key, sched);
- bcopy((void *)data, (void *)datablock, sizeof(Block));
+ memmove((void *)datablock, (void *)data, sizeof(Block));
/*
* Take the received encrypted challenge, and encrypt
* it again to get a unique session_key for the
diff --git a/secure/lib/libtelnet/kerberos5.c b/secure/lib/libtelnet/kerberos5.c
index f167b38..69a381a 100644
--- a/secure/lib/libtelnet/kerberos5.c
+++ b/secure/lib/libtelnet/kerberos5.c
@@ -1,7 +1,7 @@
/*
* $Source: /home/ncvs/src/secure/lib/libtelnet/kerberos5.c,v $
- * $Author: csgr $
- * $Id: kerberos5.c,v 1.1.1.1 1994/08/12 22:02:59 csgr Exp $
+ * $Author: rgrimes $
+ * $Id: kerberos5.c,v 1.2 1995/05/30 06:11:54 rgrimes Exp $
*/
#if !defined(lint) && !defined(SABER)
@@ -9,7 +9,7 @@ static
#ifdef __STDC__
const
#endif
-char rcsid_kerberos5_c[] = "$Id: kerberos5.c,v 1.1.1.1 1994/08/12 22:02:59 csgr Exp $";
+char rcsid_kerberos5_c[] = "$Id: kerberos5.c,v 1.2 1995/05/30 06:11:54 rgrimes Exp $";
#endif /* lint */
/*-
@@ -46,7 +46,7 @@ char rcsid_kerberos5_c[] = "$Id: kerberos5.c,v 1.1.1.1 1994/08/12 22:02:59 csgr
*/
#ifndef lint
-static char sccsid[] = "@(#)kerberos5.c 8.2 (Berkeley) 12/15/93";
+static char sccsid[] = "@(#)kerberos5.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
/*
@@ -203,7 +203,7 @@ kerberos5_send(ap)
ksum.checksum_type = CKSUMTYPE_CRC32;
ksum.contents = sum;
ksum.length = sizeof(sum);
- bzero((Voidptr )sum, sizeof(sum));
+ memset((Voidptr )sum, 0, sizeof(sum));
if (!UserNameRequested) {
if (auth_debug_mode) {
@@ -256,7 +256,7 @@ kerberos5_send(ap)
}
- bzero((char *)&creds, sizeof(creds));
+ memset((char *)&creds, 0, sizeof(creds));
creds.server = server;
if (r = krb5_cc_get_principal(ccache, &creds.client)) {
@@ -305,12 +305,12 @@ kerberos5_send(ap)
if (newkey->keytype != KEYTYPE_DES) {
if (creds.keyblock.keytype == KEYTYPE_DES)
/* use the session key in credentials instead */
- memcpy((char *)session_key,
+ memmove((char *)session_key,
(char *)creds.keyblock.contents, sizeof(Block));
else
/* XXX ? */;
} else {
- memcpy((char *)session_key, (char *)newkey->contents,
+ memmove((char *)session_key, (char *)newkey->contents,
sizeof(Block));
}
krb5_free_keyblock(newkey);
@@ -455,12 +455,14 @@ kerberos5_is(ap, data, cnt)
free(name);
if (authdat->authenticator->subkey &&
authdat->authenticator->subkey->keytype == KEYTYPE_DES) {
- bcopy((Voidptr )authdat->authenticator->subkey->contents,
- (Voidptr )session_key, sizeof(Block));
+ memmove((Voidptr )session_key,
+ (Voidptr )authdat->authenticator->subkey->contents,
+ sizeof(Block));
} else if (authdat->ticket->enc_part2->session->keytype ==
KEYTYPE_DES) {
- bcopy((Voidptr )authdat->ticket->enc_part2->session->contents,
- (Voidptr )session_key, sizeof(Block));
+ memmove((Voidptr )session_key,
+ (Voidptr )authdat->ticket->enc_part2->session->contents,
+ sizeof(Block));
} else
break;
diff --git a/secure/lib/libtelnet/krb4encpwd.c b/secure/lib/libtelnet/krb4encpwd.c
index 3d17b53..00f32e8 100644
--- a/secure/lib/libtelnet/krb4encpwd.c
+++ b/secure/lib/libtelnet/krb4encpwd.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)krb4encpwd.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)krb4encpwd.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
@@ -167,7 +167,7 @@ krb4encpwd_init(ap, server)
str_data[3] = TELQUAL_IS;
gethostname(hostname, sizeof(hostname));
realm = krb_realmofhost(hostname);
- cp = index(hostname, '.');
+ cp = strchr(hostname, '.');
if (*cp != NULL) *cp = NULL;
if (read_service_key(KRB_SERVICE_NAME, hostname, realm, 0,
KEYFILE, (char *)skey)) {
@@ -214,10 +214,10 @@ krb4encpwd_is(ap, data, cnt)
return;
switch (*data++) {
case KRB4_ENCPWD_AUTH:
- bcopy((void *)data, (void *)auth.dat, auth.length = cnt);
+ memmove((void *)auth.dat, (void *)data, auth.length = cnt);
gethostname(lhostname, sizeof(lhostname));
- if ((cp = index(lhostname, '.')) != 0) *cp = '\0';
+ if ((cp = strchr(lhostname, '.')) != 0) *cp = '\0';
if (r = krb_rd_encpwd_req(&auth, KRB_SERVICE_NAME, lhostname, 0, &adat, NULL, challenge, r_user, r_passwd)) {
Data(ap, KRB4_ENCPWD_REJECT, (void *)"Auth failed", -1);
@@ -234,7 +234,7 @@ krb4encpwd_is(ap, data, cnt)
return;
}
- bcopy((void *)adat.session, (void *)session_key, sizeof(Block));
+ memmove((void *)session_key, (void *)adat.session, sizeof(Block));
Data(ap, KRB4_ENCPWD_ACCEPT, (void *)0, 0);
auth_finished(ap, AUTH_USER);
break;
@@ -244,7 +244,7 @@ krb4encpwd_is(ap, data, cnt)
* Take the received random challenge text and save
* for future authentication.
*/
- bcopy((void *)data, (void *)challenge, sizeof(Block));
+ memmove((void *)challenge, (void *)data, sizeof(Block));
break;
@@ -255,7 +255,7 @@ krb4encpwd_is(ap, data, cnt)
/*
* If we are doing mutual authentication, get set up to send
- * the challange, and verify it when the response comes back.
+ * the challenge, and verify it when the response comes back.
*/
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) {
@@ -310,13 +310,13 @@ krb4encpwd_reply(ap, data, cnt)
gethostname(hostname, sizeof(hostname));
realm = krb_realmofhost(hostname);
- bcopy((void *)data, (void *)challenge, cnt);
- bzero(user_passwd, sizeof(user_passwd));
+ memmove((void *)challenge, (void *)data, cnt);
+ memset(user_passwd, 0, sizeof(user_passwd));
local_des_read_pw_string(user_passwd, sizeof(user_passwd)-1, "Password: ", 0);
UserPassword = user_passwd;
Challenge = challenge;
strcpy(instance, RemoteHostName);
- if ((cp = index(instance, '.')) != 0) *cp = '\0';
+ if ((cp = strchr(instance, '.')) != 0) *cp = '\0';
if (r = krb_mk_encpwd_req(&krb_token, KRB_SERVICE_NAME, instance, realm, Challenge, UserNameRequested, user_passwd)) {
krb_token.length = 0;
diff --git a/secure/lib/libtelnet/read_password.c b/secure/lib/libtelnet/read_password.c
index d487ab6..4676ed3 100644
--- a/secure/lib/libtelnet/read_password.c
+++ b/secure/lib/libtelnet/read_password.c
@@ -32,12 +32,12 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)read_password.c 8.2 (Berkeley) 12/15/93";
+static char sccsid[] = "@(#)read_password.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
/*
- * $Source: /home/ncvs/src/secure/lib/libtelnet/read_password.c,v $
- * $Author: csgr $
+ * $Source: /mit/kerberos/src/lib/des/RCS/read_password.c,v $
+ * $Author: jon $
*
* Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
* of Technology.
@@ -86,7 +86,7 @@ local_des_read_pw_string(s,max,prompt,verify)
}
/* XXX assume jmp_buf is typedef'ed to an array */
- bcopy((char *)old_env, (char *)env, sizeof(env));
+ memmove((char *)env, (char *)old_env, sizeof(env));
if (setjmp(env))
goto lose;
@@ -105,7 +105,7 @@ local_des_read_pw_string(s,max,prompt,verify)
(void) fflush(stdout);
while (!fgets(s, max, stdin));
- if ((ptr = index(s, '\n')))
+ if ((ptr = strchr(s, '\n')))
*ptr = '\0';
if (verify) {
printf("\nVerifying, please re-enter %s",prompt);
@@ -114,7 +114,7 @@ local_des_read_pw_string(s,max,prompt,verify)
clearerr(stdin);
continue;
}
- if ((ptr = index(key_string, '\n')))
+ if ((ptr = strchr(key_string, '\n')))
*ptr = '\0';
if (strcmp(s,key_string)) {
printf("\n\07\07Mismatch - try again\n");
@@ -127,7 +127,7 @@ local_des_read_pw_string(s,max,prompt,verify)
lose:
if (!ok)
- bzero(s, max);
+ memset(s, 0, max);
printf("\n");
/* turn echo back on */
tty_state.sg_flags |= ECHO;
@@ -136,9 +136,9 @@ lose:
/*
pop_signals();
*/
- bcopy((char *)env, (char *)old_env, sizeof(env));
+ memmove((char *)old_env, (char *)env, sizeof(env));
if (verify)
- bzero(key_string, sizeof (key_string));
+ memset(key_string, 0, sizeof (key_string));
s[max-1] = 0; /* force termination */
return !ok; /* return nonzero if not okay */
}
diff --git a/secure/lib/libtelnet/rsaencpwd.c b/secure/lib/libtelnet/rsaencpwd.c
index 4c1cb48..3492132 100644
--- a/secure/lib/libtelnet/rsaencpwd.c
+++ b/secure/lib/libtelnet/rsaencpwd.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)rsaencpwd.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)rsaencpwd.c 8.3 (Berkeley) 5/30/95";
#endif /* not lint */
@@ -158,9 +158,9 @@ rsaencpwd_init(ap, server)
if (server) {
str_data[3] = TELQUAL_REPLY;
- bzero(key_file, sizeof(key_file));
+ memset(key_file, 0, sizeof(key_file));
gethostname(lhostname, sizeof(lhostname));
- if ((cp = index(lhostname, '.')) != 0) *cp = '\0';
+ if ((cp = strchr(lhostname, '.')) != 0) *cp = '\0';
strcpy(key_file, "/etc/.");
strcat(key_file, lhostname);
strcat(key_file, "_privkey");
@@ -210,7 +210,7 @@ rsaencpwd_is(ap, data, cnt)
cnt--;
switch (*data++) {
case RSA_ENCPWD_AUTH:
- bcopy((void *)data, (void *)auth.dat, auth.length = cnt);
+ memmove((void *)auth.dat, (void *)data, auth.length = cnt);
if ((fp=fopen(key_file, "r"))==NULL) {
Data(ap, RSA_ENCPWD_REJECT, (void *)"Auth failed", -1);
@@ -252,7 +252,7 @@ rsaencpwd_is(ap, data, cnt)
/*
* If we are doing mutual authentication, get set up to send
- * the challange, and verify it when the response comes back.
+ * the challenge, and verify it when the response comes back.
*/
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_ONE_WAY) {
register int i;
@@ -294,12 +294,12 @@ rsaencpwd_is(ap, data, cnt)
ptr +=NumEncodeLengthOctets(chalkey_len);
*ptr++ = 0x04; /* OCTET STRING */
*ptr++ = challenge_len;
- bcopy(challenge, ptr, challenge_len);
+ memmove(ptr, challenge, challenge_len);
ptr += challenge_len;
*ptr++ = 0x04; /* OCTET STRING */
EncodeLength(ptr, i);
ptr += NumEncodeLengthOctets(i);
- bcopy(key, ptr, i);
+ memmove(ptr, key, i);
chalkey_len = 1+NumEncodeLengthOctets(chalkey_len)+chalkey_len;
Data(ap, RSA_ENCPWD_CHALLENGEKEY, (void *)chalkey, chalkey_len);
}
@@ -345,7 +345,7 @@ rsaencpwd_reply(ap, data, cnt)
* Verify that the response to the challenge is correct.
*/
- bcopy((void *)data, (void *)chalkey, cnt);
+ memmove((void *)chalkey, (void *)data, cnt);
ptr = (char *) &chalkey[0];
ptr += DecodeHeaderLength(chalkey);
if (*ptr != 0x04) {
@@ -354,7 +354,7 @@ rsaencpwd_reply(ap, data, cnt)
*ptr++;
challenge_len = DecodeValueLength(ptr);
ptr += NumEncodeLengthOctets(challenge_len);
- bcopy(ptr, challenge, challenge_len);
+ memmove(challenge, ptr, challenge_len);
ptr += challenge_len;
if (*ptr != 0x04) {
return;
@@ -362,8 +362,8 @@ rsaencpwd_reply(ap, data, cnt)
*ptr++;
pubkey_len = DecodeValueLength(ptr);
ptr += NumEncodeLengthOctets(pubkey_len);
- bcopy(ptr, pubkey, pubkey_len);
- bzero(user_passwd, sizeof(user_passwd));
+ memmove(pubkey, ptr, pubkey_len);
+ memset(user_passwd, 0, sizeof(user_passwd));
local_des_read_pw_string(user_passwd, sizeof(user_passwd)-1, "Password: ", 0);
UserPassword = user_passwd;
Challenge = challenge;
diff --git a/secure/lib/libtelnet/spx.c b/secure/lib/libtelnet/spx.c
index b4634d0..5b625c7 100644
--- a/secure/lib/libtelnet/spx.c
+++ b/secure/lib/libtelnet/spx.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)spx.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)spx.c 8.2 (Berkeley) 5/30/95";
#endif /* not lint */
#ifdef SPX
OpenPOWER on IntegriCloud