diff options
author | Theodore Tso <tytso@mit.edu> | 1995-03-17 20:58:31 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1995-03-17 20:58:31 +0000 |
commit | 96d4fa20ba03220f81ecb70a63022fc3da5ff530 (patch) | |
tree | 2ef4e5e3eb4818ffc91ef4305d3f9a027a638ba6 /src/appl/bsd | |
parent | 354828d7e52be7dbdfb1ecb01355eadb7d062f26 (diff) | |
download | krb5-96d4fa20ba03220f81ecb70a63022fc3da5ff530.tar.gz krb5-96d4fa20ba03220f81ecb70a63022fc3da5ff530.tar.xz krb5-96d4fa20ba03220f81ecb70a63022fc3da5ff530.zip |
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().
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5151 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/bsd')
-rw-r--r-- | src/appl/bsd/ChangeLog | 16 | ||||
-rw-r--r-- | src/appl/bsd/Makefile.in | 4 | ||||
-rw-r--r-- | src/appl/bsd/configure.in | 2 | ||||
-rw-r--r-- | src/appl/bsd/kcmd.c | 1 | ||||
-rw-r--r-- | src/appl/bsd/krlogind.c | 11 |
5 files changed, 26 insertions, 8 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 4fe21ef4a6..a4d3899cbe 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 f2d5890c00..54abb2ceec 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 9b711342ff..ea5f95b757 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 c2989ae4da..5bda9ff35a 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 71e4753f4e..1f9dac7be8 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 */ } |