From ca00f2df5ca41bca5f471b6f0eacae4485e94848 Mon Sep 17 00:00:00 2001 From: dfr Date: Mon, 26 Sep 1994 09:22:08 +0000 Subject: [PATCH] Move the call to des_set_key to after the kerberos initialisation, removing assumption about the implementation of des_read/des_write. --- usr.bin/rlogin/rlogin.c | 6 +++--- usr.bin/rsh/rsh.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index fac7ded678a9..d9379c2550ed 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -212,7 +212,6 @@ main(argc, argv) #ifdef KERBEROS case 'x': doencrypt = 1; - des_set_key(cred.session, schedule); break; #endif #endif @@ -295,10 +294,11 @@ try_connect: dest_realm = krb_realmofhost(host); #ifdef CRYPT - if (doencrypt) + if (doencrypt) { rem = krcmd_mutual(&host, sp->s_port, user, term, 0, dest_realm, &cred, schedule); - else + des_set_key(cred.session, schedule); + } else #endif /* CRYPT */ rem = krcmd(&host, sp->s_port, user, term, 0, dest_realm); diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index c663f794034b..49c5b86f10d7 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -42,8 +42,8 @@ static char sccsid[] = "@(#)rsh.c 8.3 (Berkeley) 4/6/94"; #endif /* not lint */ /* - * $Source: mit/rsh/RCS/rsh.c,v $ - * $Header: mit/rsh/RCS/rsh.c,v 5.1 89/07/31 19:28:59 kfall Exp Locker: kfall $ + * $Source: /home/ncvs/src/usr.bin/rsh/rsh.c,v $ + * $Header: /home/ncvs/src/usr.bin/rsh/rsh.c,v 1.1.1.1 1994/05/27 12:32:35 rgrimes Exp $ */ #include @@ -162,7 +162,6 @@ main(argc, argv) #ifdef CRYPT case 'x': doencrypt = 1; - des_set_key(cred.session, schedule); break; #endif #endif @@ -234,10 +233,11 @@ try_connect: dest_realm = krb_realmofhost(host); #ifdef CRYPT - if (doencrypt) + if (doencrypt) { rem = krcmd_mutual(&host, sp->s_port, user, args, &rfd2, dest_realm, &cred, schedule); - else + des_set_key(cred.session, schedule); + } else #endif rem = krcmd(&host, sp->s_port, user, args, &rfd2, dest_realm);