diff options
author | Mark Murray <markm@FreeBSD.org> | 1997-09-28 08:38:04 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 1997-09-28 08:38:04 +0000 |
commit | 0934db4674724847eeea405935dcb88658e3dbf6 (patch) | |
tree | 487206ccca342524379f96daf4058c0507e57d3f /libexec/rshd | |
parent | e7509c75f59b49d7325d1a26824c9faf129653da (diff) | |
download | src-0934db4674724847eeea405935dcb88658e3dbf6.tar.gz src-0934db4674724847eeea405935dcb88658e3dbf6.zip |
Changes for the new KTH Kerberos4.
Also make -Wall a bit quieter
Notes
Notes:
svn path=/head/; revision=29917
Diffstat (limited to 'libexec/rshd')
-rw-r--r-- | libexec/rshd/Makefile | 7 | ||||
-rw-r--r-- | libexec/rshd/rshd.c | 30 |
2 files changed, 21 insertions, 16 deletions
diff --git a/libexec/rshd/Makefile b/libexec/rshd/Makefile index c94f453e97b3..cb23d4cfedd2 100644 --- a/libexec/rshd/Makefile +++ b/libexec/rshd/Makefile @@ -1,12 +1,11 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $Id: Makefile,v 1.6 1997/02/22 14:22:22 peter Exp $ +# $Id: Makefile,v 1.7 1997/04/23 03:06:47 davidn Exp $ PROG= rshd SRCS= rshd.c MAN8= rshd.8 -.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_KERBEROS) \ - || defined(MAKE_EBONES)) +.if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) CFLAGS+=-DKERBEROS -DCRYPT DPADD= ${LIBKRB} ${LIBDES} LDADD= -lkrb -ldes @@ -14,7 +13,7 @@ DISTRIBUTION= krb .endif # For login_cap handling -CFLAGS+=-DLOGIN_CAP +CFLAGS+=-DLOGIN_CAP -Wall DPADD+= ${LIBUTIL} LDADD+= -lutil diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index dbb135183caa..a5e8b6e884a9 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -30,17 +30,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: rshd.c,v 1.17 1997/05/10 19:02:03 davidn Exp $ + * $Id: rshd.c,v 1.18 1997/07/18 21:04:19 wosch Exp $ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1988, 1989, 1992, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; +static const char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; #endif /* not lint */ /* @@ -90,7 +90,7 @@ void usage __P((void)); #ifdef KERBEROS #include <des.h> -#include <kerberosIV/krb.h> +#include <krb.h> #define VERSION_SIZE 9 #define SECURE_MESSAGE "This rsh session is using DES encryption for all transmissions.\r\n" #define OPTIONS "alnkvxL" @@ -182,6 +182,7 @@ main(argc, argv) syslog(LOG_WARNING, "setsockopt (SO_LINGER): %m"); doit(&from); /* NOTREACHED */ + return(0); } char username[20] = "USER="; @@ -419,7 +420,7 @@ doit(fromp) "rcmd", instance, &fromaddr, &local_addr, kdata, "", schedule, version); - des_set_key_krb(&kdata->session, schedule); + des_set_key(&kdata->session, schedule); } else #endif rc = krb_recvauth(authopts, 0, ticket, "rcmd", @@ -573,7 +574,8 @@ fail: static char msg[] = SECURE_MESSAGE; (void) close(pv1[1]); (void) close(pv2[1]); - des_write(s, msg, sizeof(msg) - 1); + des_enc_write(s, msg, sizeof(msg) - 1, + schedule, &kdata->session); } else #endif @@ -629,7 +631,8 @@ fail: #ifdef CRYPT #ifdef KERBEROS if (doencrypt) - ret = des_read(s, &sig, 1); + ret = des_enc_read(s, &sig, 1, + schedule, &kdata->session); else #endif #endif @@ -650,7 +653,8 @@ fail: #ifdef KERBEROS if (doencrypt) (void) - des_write(s, buf, cc); + des_enc_write(s, buf, cc, + schedule, &kdata->session); else #endif #endif @@ -667,14 +671,16 @@ fail: shutdown(pv1[0], 1+1); FD_CLR(pv1[0], &readfrom); } else - (void) des_write(STDOUT_FILENO, - buf, cc); + (void) des_enc_write(STDOUT_FILENO, + buf, cc, + schedule, &kdata->session); } if (doencrypt && FD_ISSET(pv2[0], &wready)) { errno = 0; - cc = des_read(STDIN_FILENO, - buf, sizeof(buf)); + cc = des_enc_read(STDIN_FILENO, + buf, sizeof(buf), + schedule, &kdata->session); if (cc <= 0) { shutdown(pv2[0], 1+1); FD_CLR(pv2[0], &writeto); |