From: deraadt Date: Thu, 13 Feb 1997 22:32:46 +0000 (+0000) Subject: if i find one more little problem, and have to make one more little X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ee749250063879be80986b3be09b760bc1ef40d;p=openbsd if i find one more little problem, and have to make one more little tweak to this ip option handling code I am going to absolutely scream in rage, following which I will rip the bloody innards out of netinet and build my own new incompatible option checking/processing interface that does not make it so hidiously difficult to check if a session has source routes active! --- diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index c755ab1a892..d1250271d02 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.10 1997/02/13 22:29:12 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.11 1997/02/13 22:33:13 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -255,7 +255,7 @@ rendezvous_request(xprt) if (!getsockopt(sock, IPPROTO_IP, IP_OPTIONS, (char *)&opts, &optsize) && optsize != 0) { for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts < - sizeof opts; ) { + optsize; ) { u_char c = (u_char)opts.ipopt_list[i]; if (c == IPOPT_LSRR || c == IPOPT_SSRR) { close(sock); diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index 1d2ee6f20b8..052b486e8fa 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */ -static char *rcsid = "$Id: rlogind.c,v 1.18 1997/02/13 22:29:10 deraadt Exp $"; +static char *rcsid = "$Id: rlogind.c,v 1.19 1997/02/13 22:33:11 deraadt Exp $"; #endif /* not lint */ /* @@ -270,7 +270,7 @@ doit(f, fromp) if (getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts, &optsize) == 0 && optsize != 0) { for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts < - sizeof opts; ) { + optsize; ) { u_char c = (u_char)opts.ipopt_list[i]; if (c == IPOPT_LSRR || c == IPOPT_SSRR) exit(1); diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 8575b2ee483..a825e70a61e 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; */ -static char *rcsid = "$Id: rshd.c,v 1.15 1997/02/13 22:29:07 deraadt Exp $"; +static char *rcsid = "$Id: rshd.c,v 1.16 1997/02/13 22:32:46 deraadt Exp $"; #endif /* not lint */ /* @@ -250,7 +250,7 @@ doit(fromp) if (!getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts, &optsize) && optsize != 0) { for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts < - sizeof opts; ) { + optsize; ) { u_char c = (u_char)opts.ipopt_list[i]; if (c == IPOPT_LSRR || c == IPOPT_SSRR) exit(1);