summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-03-09 15:03:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-03-09 15:03:30 +0000
commiteb3beced06d04e849a817c1a06b68cab7c5fb07f (patch)
treee1629e8080919ee2c080356e672c42adb3b14dcf /libexec
parent90eb683ec441ed53501b298845a13d73f23451d9 (diff)
-Wall cleanup
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rlogind/rlogind.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 17832e69cc0..74fe93dbf2c 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.23 2000/01/27 05:21:13 itojun Exp $";
+static char *rcsid = "$Id: rlogind.c,v 1.24 2000/03/09 15:03:29 deraadt Exp $";
#endif /* not lint */
/*
@@ -282,7 +282,7 @@ doit(f, fromp)
#ifdef KERBEROS
if (use_kerberos) {
- retval = do_krb_login(fromp);
+ retval = do_krb_login((struct sockaddr_in *)fromp);
if (retval == 0)
authenticated++;
else if (retval > 0)
@@ -299,30 +299,29 @@ doit(f, fromp)
fatal(f, "Permission denied", 0);
}
#ifdef IP_OPTIONS
- if (fromp->sa_family == AF_INET)
- {
- struct ipoption opts;
- int optsize = sizeof(opts), ipproto, i;
- struct protoent *ip;
-
- if ((ip = getprotobyname("ip")) != NULL)
- ipproto = ip->p_proto;
- else
- ipproto = IPPROTO_IP;
- if (getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts,
- &optsize) == 0 && optsize != 0) {
- for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts <
- optsize; ) {
- u_char c = (u_char)opts.ipopt_list[i];
- if (c == IPOPT_LSRR || c == IPOPT_SSRR)
- exit(1);
- if (c == IPOPT_EOL)
- break;
- i += (c == IPOPT_NOP) ? 1 :
- (u_char)opts.ipopt_list[i+1];
+ if (fromp->sa_family == AF_INET) {
+ struct ipoption opts;
+ int optsize = sizeof(opts), ipproto, i;
+ struct protoent *ip;
+
+ if ((ip = getprotobyname("ip")) != NULL)
+ ipproto = ip->p_proto;
+ else
+ ipproto = IPPROTO_IP;
+ if (getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts,
+ &optsize) == 0 && optsize != 0) {
+ for (i = 0; (void *)&opts.ipopt_list[i] -
+ (void *)&opts < optsize; ) {
+ u_char c = (u_char)opts.ipopt_list[i];
+ if (c == IPOPT_LSRR || c == IPOPT_SSRR)
+ exit(1);
+ if (c == IPOPT_EOL)
+ break;
+ i += (c == IPOPT_NOP) ? 1 :
+ (u_char)opts.ipopt_list[i+1];
+ }
}
}
- }
#endif
if (do_rlogin(fromp) == 0)
authenticated++;