diff options
author | markm <markm@FreeBSD.org> | 1997-09-28 08:36:04 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1997-09-28 08:36:04 +0000 |
commit | 55c21e72637ac7a9924830a88be54998f8c2c10b (patch) | |
tree | 21a5c4d006bc41d34e245cabe6b7db1825528ea2 | |
parent | 159b51570ff9514e15ce3d39fd05c2dcacbab553 (diff) | |
download | FreeBSD-src-55c21e72637ac7a9924830a88be54998f8c2c10b.zip FreeBSD-src-55c21e72637ac7a9924830a88be54998f8c2c10b.tar.gz |
Changes for the new KTH Kerberos.
Also make -Wall a bit quieter.
-rw-r--r-- | libexec/rlogind/Makefile | 14 | ||||
-rw-r--r-- | libexec/rlogind/rlogind.c | 24 |
2 files changed, 26 insertions, 12 deletions
diff --git a/libexec/rlogind/Makefile b/libexec/rlogind/Makefile index 41136e2..c12984f 100644 --- a/libexec/rlogind/Makefile +++ b/libexec/rlogind/Makefile @@ -1,18 +1,24 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $Id$ +# $Id: Makefile,v 1.7 1997/02/22 14:22:07 peter Exp $ PROG= rlogind SRCS= rlogind.c MAN8= rlogind.8 DPADD= ${LIBUTIL} LDADD= -lutil +CFLAGS+= -Wall -.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_KERBEROS) \ - || defined(MAKE_EBONES)) -CFLAGS+=-DKERBEROS -DCRYPT +.if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) +SRCS+= encrypt.c +CFLAGS+=-DKERBEROS -DCRYPT -DHAVE_CONFIG_H \ + -I${.CURDIR}/../../kerberosIV/include \ + -I${.CURDIR}/../../crypto/kerberosIV/include \ + -I${.CURDIR}/../../crypto/kerberosIV/lib/roken \ + -I${.CURDIR}/../../crypto/kerberosIV/appl/bsd DPADD= ${LIBKRB} ${LIBDES} LDADD+= -lkrb -ldes DISTRIBUTION= krb +.PATH: ${.CURDIR}/../../crypto/kerberosIV/appl/bsd .endif .include <bsd.prog.mk> diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index 97ba074..e92b323 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -30,17 +30,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: rlogind.c,v 1.16 1997/03/24 06:01:39 imp Exp $ + * $Id: rlogind.c,v 1.17 1997/03/28 15:48:16 imp Exp $ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1983, 1988, 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; +static const char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; #endif /* not lint */ /* @@ -53,6 +53,7 @@ static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */ #define FD_SETSIZE 16 /* don't need many bits for select */ +#include <sys/types.h> #include <sys/param.h> #include <sys/stat.h> #include <sys/ioctl.h> @@ -74,6 +75,7 @@ static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; #include <unistd.h> #include <stdlib.h> #include <string.h> +#include <libutil.h> #include "pathnames.h" #ifndef TIOCPKT_WINDOW @@ -82,7 +84,7 @@ static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; #ifdef KERBEROS #include <des.h> -#include <kerberosIV/krb.h> +#include <krb.h> #define SECURE_MESSAGE "This rlogin session is using DES encryption for all transmissions.\r\n" AUTH_DAT *kdata; @@ -191,6 +193,7 @@ main(argc, argv) syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); doit(0, &from); + return 0; } int child; @@ -290,7 +293,10 @@ doit(f, fromp) #ifdef KERBEROS #ifdef CRYPT if (doencrypt) - (void) des_write(f, SECURE_MESSAGE, sizeof(SECURE_MESSAGE) - 1); + (void) des_enc_write(f, + SECURE_MESSAGE, + strlen(SECURE_MESSAGE), + schedule, &kdata->session); #endif #endif netf = f; @@ -447,7 +453,8 @@ protocol(f, p) #ifdef CRYPT #ifdef KERBEROS if (doencrypt) - fcc = des_read(f, fibuf, sizeof(fibuf)); + fcc = des_enc_read(f, fibuf, sizeof(fibuf), + schedule, &kdata->session); else #endif #endif @@ -515,7 +522,8 @@ protocol(f, p) #ifdef CRYPT #ifdef KERBEROS if (doencrypt) - cc = des_write(f, pbp, pcc); + cc = des_enc_write(f, pbp, pcc, + schedule, &kdata->session); else #endif #endif @@ -693,7 +701,7 @@ do_krb_login(dest) ticket, "rcmd", instance, dest, &faddr, kdata, "", schedule, version); - des_set_key_krb(&kdata->session, schedule); + des_set_key(&kdata->session, schedule); } else #endif |