summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Insulander <hin@cvs.openbsd.org>2001-06-28 04:52:43 +0000
committerHans Insulander <hin@cvs.openbsd.org>2001-06-28 04:52:43 +0000
commit2b466fe53ad673a59489e2f7415d96169bb2d014 (patch)
treef208029ee841e303a10cdf39386c32266edb51eb
parent51d9bd1d6a4026864be0e5ccde66fec174fc8f89 (diff)
-Wall fixes
-rw-r--r--kerberosIV/src/admin/adm_locl.h1
-rw-r--r--kerberosIV/src/lib/des/rnd_keys.c11
-rw-r--r--kerberosIV/src/lib/krb/send_to_kdc.c9
-rw-r--r--kerberosIV/src/lib/krb/tf_util.c18
4 files changed, 9 insertions, 30 deletions
diff --git a/kerberosIV/src/admin/adm_locl.h b/kerberosIV/src/admin/adm_locl.h
index b3f4ce41818..cccf779f80b 100644
--- a/kerberosIV/src/admin/adm_locl.h
+++ b/kerberosIV/src/admin/adm_locl.h
@@ -43,6 +43,7 @@
#include <string.h>
#include <stdlib.h>
#include <assert.h>
+#include <utime.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
diff --git a/kerberosIV/src/lib/des/rnd_keys.c b/kerberosIV/src/lib/des/rnd_keys.c
index 79168b31c9e..7d27e6e09e2 100644
--- a/kerberosIV/src/lib/des/rnd_keys.c
+++ b/kerberosIV/src/lib/des/rnd_keys.c
@@ -194,17 +194,6 @@ sigALRM(int sig)
#endif
#endif
-static void
-des_not_rand_data(unsigned char *data, int size)
-{
- int i;
-
- srandom (time (NULL));
-
- for(i = 0; i < size; ++i)
- data[i] ^= random() % 0x100;
-}
-
#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__)
#ifndef HAVE_SETITIMER
diff --git a/kerberosIV/src/lib/krb/send_to_kdc.c b/kerberosIV/src/lib/krb/send_to_kdc.c
index 57a8f6bdf91..936189f6fdf 100644
--- a/kerberosIV/src/lib/krb/send_to_kdc.c
+++ b/kerberosIV/src/lib/krb/send_to_kdc.c
@@ -22,7 +22,7 @@ or implied warranty.
#include "krb_locl.h"
#include <base64.h>
-RCSID("$KTH: send_to_kdc.c,v 1.71 1999/11/25 02:20:53 assar Exp $");
+RCSID("$KTH: send_to_kdc.c,v 1.71.2.1 2000/10/10 12:47:21 assar Exp $");
struct host {
struct sockaddr_in addr;
@@ -143,7 +143,6 @@ send_to_kdc(KTEXT pkt, KTEXT rpkt, const char *realm)
char **addr_list;
int j;
int n_addrs;
- struct host *tmp;
if (k_host->proto == PROTO_HTTP && proxy != NULL) {
n_addrs = 1;
@@ -488,6 +487,12 @@ send_recv(KTEXT pkt, KTEXT rpkt, struct host *host)
timeout.tv_sec = client_timeout;
timeout.tv_usec = 0;
FD_ZERO(&readfds);
+ if (s >= FD_SETSIZE) {
+ if (krb_debug)
+ krb_warning("fd too large\n");
+ close (s);
+ return FALSE;
+ }
FD_SET(s, &readfds);
/* select - either recv is ready, or timeout */
diff --git a/kerberosIV/src/lib/krb/tf_util.c b/kerberosIV/src/lib/krb/tf_util.c
index d3a76546471..7b8d3e39eac 100644
--- a/kerberosIV/src/lib/krb/tf_util.c
+++ b/kerberosIV/src/lib/krb/tf_util.c
@@ -21,7 +21,7 @@ or implied warranty.
#include "krb_locl.h"
-RCSID("$KTH: tf_util.c,v 1.39 1999/12/02 18:03:16 assar Exp $");
+RCSID("$KTH: tf_util.c,v 1.39.2.2 2000/06/23 04:03:58 assar Exp $");
#define TOO_BIG -1
@@ -249,20 +249,6 @@ tf_init(char *tf_name, int rw)
int
tf_create(char *tf_name)
{
- struct stat statbuf;
- char garbage[BUFSIZ];
-
- fd = open(tf_name, O_RDWR | O_BINARY, 0);
- if (fd >= 0) {
- if (fstat (fd, &statbuf) == 0) {
- int i;
-
- for (i = 0; i < statbuf.st_size; i += sizeof(garbage))
- write (fd, garbage, sizeof(garbage));
- }
- close (fd);
- }
-
if (unlink (tf_name) && errno != ENOENT)
return TKT_FIL_ACC;
@@ -783,8 +769,6 @@ out:
int
tf_store_addr (const char *realm, struct in_addr *addr)
{
- CREDENTIALS c;
- krb_principal princ;
int ret;
des_cblock s = { 0, 0, 0, 0, 0, 0, 0, 0 };
KTEXT_ST t;