1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00

Move the call to des_set_key to after the kerberos initialisation, removing

assumption about the implementation of des_read/des_write.
This commit is contained in:
Doug Rabson 1994-09-26 09:22:08 +00:00
parent af813416c3
commit ab1698b3e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3113
2 changed files with 8 additions and 8 deletions

View File

@ -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 @@ main(argc, argv)
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);

View File

@ -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 <sys/types.h>
@ -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 @@ main(argc, argv)
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);