summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/appl/bsd/ChangeLog16
-rw-r--r--src/appl/bsd/Makefile.in4
-rw-r--r--src/appl/bsd/configure.in2
-rw-r--r--src/appl/bsd/kcmd.c1
-rw-r--r--src/appl/bsd/krlogind.c11
5 files changed, 26 insertions, 8 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index 4fe21ef4a..a4d3899cb 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,19 @@
+Tue Mar 14 16:08:08 1995 <tytso@rsx-11.mit.edu>
+
+ * Makefile.in, configure.in: Use the libdes425 library so that the
+ DES code doesn't get dragged in twice.
+
+ * krlogind.c: Include <sys/time.h> so that Linux can get the
+ FD_SET macros.
+
+ * kcmd.c (kcmd): Close the credentials cache when you're done with
+ it.
+
+ * krlogind.c (doit): Always initialize the Krb5 error table.
+
+ * krlogind.c (main, doit): Minor type fixes to gethostbyname(),
+ accept().
+
Fri Mar 10 18:32:22 1995 Theodore Y. Ts'o <tytso@dcl>
* kcmd.c (kcmd): Initialize ret_cred to zero so that in case of an
diff --git a/src/appl/bsd/Makefile.in b/src/appl/bsd/Makefile.in
index f2d5890c0..54abb2cee 100644
--- a/src/appl/bsd/Makefile.in
+++ b/src/appl/bsd/Makefile.in
@@ -52,14 +52,14 @@ install::
$(INSTALL_DATA) $(srcdir)/rlogin.M ${DESTDIR}$(CLIENT_MANDIR)/rlogin.1
krshd: krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(LIBOBJS) $(DEPKLIB)
- $(CC) $(CFLAGS) -o krshd krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(LIBOBJS) $(KLIB) $(K4LIB) $(LIBS)
+ $(CC) $(CFLAGS) -o krshd krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(LIBOBJS) $(K4LIB) $(KLIB) $(LIBS)
install::
$(INSTALL_PROGRAM) krshd $(DESTDIR)$(SERVER_BINDIR)/krshd
$(INSTALL_DATA) $(srcdir)/krshd.M ${DESTDIR}$(SERVER_MANDIR)/krshd.8
krlogind: krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(DEPKLIB)
- $(CC) $(CFLAGS) -o krlogind krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(KLIB) $(K4LIB) $(LIBS)
+ $(CC) $(CFLAGS) -o krlogind krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(K4LIB) $(KLIB) $(LIBS)
install::
$(INSTALL_PROGRAM) krlogind $(DESTDIR)$(SERVER_BINDIR)/krlogind
diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in
index 9b711342f..ea5f95b75 100644
--- a/src/appl/bsd/configure.in
+++ b/src/appl/bsd/configure.in
@@ -57,7 +57,7 @@ PATH=$save_path
dnl
AC_ARG_WITH([krb4],[include Kerberos V4 support],
ADD_DEF(-DKRB5_KRB4_COMPAT)
-K4LIB='$(KRB4)/lib/libkrb.a $(KRB4)/lib/libdes.a',
+K4LIB='$(KRB4)/lib/libkrb.a $(KRB4)/lib/libdes425.a',
echo "warning: no krb4 backwards compatibility support"
K4LIB=)
AC_SUBST(K4LIB)
diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c
index c2989ae4d..5bda9ff35 100644
--- a/src/appl/bsd/kcmd.c
+++ b/src/appl/bsd/kcmd.c
@@ -291,6 +291,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
/* Get ticket from credentials cache or kdc */
status = krb5_get_credentials(bsd_context, 0, cc, get_cred, &ret_cred);
+ (void) krb5_cc_close(bsd_context, cc);
krb5_free_creds(bsd_context, get_cred);
if (status) goto bad2;
diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c
index 71e4753f4..1f9dac7be 100644
--- a/src/appl/bsd/krlogind.c
+++ b/src/appl/bsd/krlogind.c
@@ -118,6 +118,7 @@ char copyright[] =
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <sys/file.h>
+#include <sys/time.h>
#include <ctype.h>
#include <fcntl.h>
#include <netinet/in.h>
@@ -427,7 +428,7 @@ main(argc, argv)
exit(2);
}
- if ((fd = accept(s, &from, &fromlen)) < 0) {
+ if ((fd = accept(s, (struct sockaddr *) &from, &fromlen)) < 0) {
fprintf(stderr, "Error in accept: %s\n", strerror(errno));
exit(2);
}
@@ -499,7 +500,7 @@ void doit(f, fromp)
#endif
fromp->sin_port = ntohs((u_short)fromp->sin_port);
- hp = gethostbyaddr(&fromp->sin_addr, sizeof (struct in_addr),
+ hp = gethostbyaddr((char *) &fromp->sin_addr, sizeof (struct in_addr),
fromp->sin_family);
if (hp == 0) {
/*
@@ -515,10 +516,10 @@ void doit(f, fromp)
fatal(f, "Permission denied - Malformed from address\n");
#ifdef KERBEROS
+ krb5_init_context(&bsd_context);
+ krb5_init_ets(bsd_context);
if (must_pass_k5 || must_pass_one) {
- /* Init error messages and setup des buffers */
- krb5_init_context(&bsd_context);
- krb5_init_ets(bsd_context);
+ /* setup des buffers */
desinbuf.data = des_inbuf;
desoutbuf.data = des_outbuf; /* Set up des buffers */
}