summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-04-19 18:31:49 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-04-19 18:31:49 +0000
commit6399f7ab495d8544ea0bea12d7738fa1df3c3605 (patch)
treefd142d1215f1d242163b93771879aa84b35b07f2
parenta7d3e8ca47a31f24f3463bf602688143464adaa3 (diff)
- kill unused var
- sscanf format string should scan for u_short not u_int - some missing includes - convert u_short -> in_port_t (from millert) ok millert@
-rw-r--r--lib/libwrap/fix_options.c5
-rw-r--r--lib/libwrap/hosts_access.c7
-rw-r--r--lib/libwrap/rfc931.c12
3 files changed, 13 insertions, 11 deletions
diff --git a/lib/libwrap/fix_options.c b/lib/libwrap/fix_options.c
index 4c48bccb859..4dfc630d657 100644
--- a/lib/libwrap/fix_options.c
+++ b/lib/libwrap/fix_options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fix_options.c,v 1.5 2003/04/05 00:49:25 tdeval Exp $ */
+/* $OpenBSD: fix_options.c,v 1.6 2003/04/19 18:31:48 avsm Exp $ */
/*
* Routine to disable IP-level socket options. This code was taken from 4.4BSD
@@ -11,7 +11,7 @@
#if 0
static char sccsid[] = "@(#) fix_options.c 1.4 97/02/12 02:13:22";
#else
-static char rcsid[] = "$OpenBSD: fix_options.c,v 1.5 2003/04/05 00:49:25 tdeval Exp $";
+static char rcsid[] = "$OpenBSD: fix_options.c,v 1.6 2003/04/19 18:31:48 avsm Exp $";
#endif
#endif
@@ -48,7 +48,6 @@ struct request_info *request;
size_t lps;
struct protoent *ip;
int fd = request->fd;
- unsigned int opt;
int i;
struct sockaddr_storage ss;
int sslen;
diff --git a/lib/libwrap/hosts_access.c b/lib/libwrap/hosts_access.c
index 6362ed7ccc9..27617b4fbc6 100644
--- a/lib/libwrap/hosts_access.c
+++ b/lib/libwrap/hosts_access.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hosts_access.c,v 1.10 2002/12/31 02:29:17 itojun Exp $ */
+/* $OpenBSD: hosts_access.c,v 1.11 2003/04/19 18:31:48 avsm Exp $ */
/*
* This module implements a simple access control language that is based on
@@ -23,7 +23,7 @@
#if 0
static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
#else
-static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.10 2002/12/31 02:29:17 itojun Exp $";
+static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.11 2003/04/19 18:31:48 avsm Exp $";
#endif
#endif
@@ -42,6 +42,9 @@ static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.10 2002/12/31 02:29:17 itoju
#include <errno.h>
#include <setjmp.h>
#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <limits.h>
#ifdef NETGROUP
#include <netgroup.h>
#endif
diff --git a/lib/libwrap/rfc931.c b/lib/libwrap/rfc931.c
index d3c3f6d886c..7934c5ee0bb 100644
--- a/lib/libwrap/rfc931.c
+++ b/lib/libwrap/rfc931.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfc931.c,v 1.8 2002/06/03 12:04:08 deraadt Exp $ */
+/* $OpenBSD: rfc931.c,v 1.9 2003/04/19 18:31:48 avsm Exp $ */
/* rfc1413 does an attempt at an ident query to a client. Originally written
* by Wietse Venema, rewritten by Bob Beck <beck@openbsd.org> to avoid
@@ -6,7 +6,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rfc931.c,v 1.8 2002/06/03 12:04:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rfc931.c,v 1.9 2003/04/19 18:31:48 avsm Exp $";
#endif
#include <stdio.h>
@@ -73,11 +73,11 @@ rfc1413(rmt_sin, our_sin, dest, dsize, ident_timeout_time)
size_t dsize;
int ident_timeout_time;
{
- u_short rmt_port, our_port;
+ in_port_t rmt_port, our_port;
int s, i, gotit, salen;
char *cp;
- u_short *rmt_portp;
- u_short *our_portp;
+ in_port_t *rmt_portp;
+ in_port_t *our_portp;
fd_set *readfds = NULL;
fd_set *writefds = NULL;
struct sockaddr_storage rmt_query_sin;
@@ -240,7 +240,7 @@ rfc1413(rmt_sin, our_sin, dest, dsize, ident_timeout_time)
goto out;
}
- if ((sscanf(tbuf,"%u , %u : USERID :%*[^:]:%255s", &rmt_port,
+ if ((sscanf(tbuf,"%hu , %hu : USERID :%*[^:]:%255s", &rmt_port,
&our_port, user) == 3) &&
(ntohs(*rmt_portp) == rmt_port) &&
(ntohs(*our_portp) == our_port)) {