diff options
| author | millert <> | 1997-04-05 21:13:17 +0000 |
|---|---|---|
| committer | millert <> | 1997-04-05 21:13:17 +0000 |
| commit | 9156235dba65010d9f983e3b8fc0e0b2739c78d4 (patch) | |
| tree | 178131fb064d2fb2a659152bdfbfb0c0bb5788cd /src/lib/libc/net/rcmd.c | |
| parent | 06967c8a88bc843a5afe2987c242b4f744a4dabf (diff) | |
| download | openbsd-9156235dba65010d9f983e3b8fc0e0b2739c78d4.tar.gz openbsd-9156235dba65010d9f983e3b8fc0e0b2739c78d4.tar.bz2 openbsd-9156235dba65010d9f983e3b8fc0e0b2739c78d4.zip | |
Use in_addr_t not u_long and use in_port_t in some cases instead
of u_short or u_int16_t.
Diffstat (limited to 'src/lib/libc/net/rcmd.c')
| -rw-r--r-- | src/lib/libc/net/rcmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libc/net/rcmd.c b/src/lib/libc/net/rcmd.c index 8029938df3..a0adaf8ed0 100644 --- a/src/lib/libc/net/rcmd.c +++ b/src/lib/libc/net/rcmd.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | #if defined(LIBC_SCCS) && !defined(lint) | 36 | #if defined(LIBC_SCCS) && !defined(lint) |
| 37 | static char *rcsid = "$OpenBSD: rcmd.c,v 1.19 1997/01/25 21:30:37 deraadt Exp $"; | 37 | static char *rcsid = "$OpenBSD: rcmd.c,v 1.20 1997/04/05 21:13:15 millert Exp $"; |
| 38 | #endif /* LIBC_SCCS and not lint */ | 38 | #endif /* LIBC_SCCS and not lint */ |
| 39 | 39 | ||
| 40 | #include <sys/param.h> | 40 | #include <sys/param.h> |
| @@ -56,14 +56,14 @@ static char *rcsid = "$OpenBSD: rcmd.c,v 1.19 1997/01/25 21:30:37 deraadt Exp $" | |||
| 56 | #include <syslog.h> | 56 | #include <syslog.h> |
| 57 | #include <stdlib.h> | 57 | #include <stdlib.h> |
| 58 | 58 | ||
| 59 | int __ivaliduser __P((FILE *, u_long, const char *, const char *)); | 59 | int __ivaliduser __P((FILE *, in_addr_t, const char *, const char *)); |
| 60 | static int __icheckhost __P((u_int32_t, const char *)); | 60 | static int __icheckhost __P((u_int32_t, const char *)); |
| 61 | static char *__gethostloop __P((u_int32_t)); | 61 | static char *__gethostloop __P((u_int32_t)); |
| 62 | 62 | ||
| 63 | int | 63 | int |
| 64 | rcmd(ahost, rport, locuser, remuser, cmd, fd2p) | 64 | rcmd(ahost, rport, locuser, remuser, cmd, fd2p) |
| 65 | char **ahost; | 65 | char **ahost; |
| 66 | u_short rport; | 66 | in_port_t rport; |
| 67 | const char *locuser, *remuser, *cmd; | 67 | const char *locuser, *remuser, *cmd; |
| 68 | int *fd2p; | 68 | int *fd2p; |
| 69 | { | 69 | { |
| @@ -259,7 +259,7 @@ rresvport(alport) | |||
| 259 | s = socket(AF_INET, SOCK_STREAM, 0); | 259 | s = socket(AF_INET, SOCK_STREAM, 0); |
| 260 | if (s < 0) | 260 | if (s < 0) |
| 261 | return (-1); | 261 | return (-1); |
| 262 | sin.sin_port = htons((u_short)*alport); | 262 | sin.sin_port = htons((in_port_t)*alport); |
| 263 | if (*alport < IPPORT_RESERVED - 1) { | 263 | if (*alport < IPPORT_RESERVED - 1) { |
| 264 | if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) | 264 | if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) |
| 265 | return (s); | 265 | return (s); |
| @@ -298,7 +298,7 @@ ruserok(rhost, superuser, ruser, luser) | |||
| 298 | addrs[i] = 0; | 298 | addrs[i] = 0; |
| 299 | 299 | ||
| 300 | for (i = 0; i < MAXADDRS && addrs[i]; i++) | 300 | for (i = 0; i < MAXADDRS && addrs[i]; i++) |
| 301 | if (iruserok((u_long)addrs[i], superuser, ruser, luser) == 0) | 301 | if (iruserok((in_addr_t)addrs[i], superuser, ruser, luser) == 0) |
| 302 | return (0); | 302 | return (0); |
| 303 | return (-1); | 303 | return (-1); |
| 304 | } | 304 | } |
| @@ -390,7 +390,7 @@ again: | |||
| 390 | int | 390 | int |
| 391 | __ivaliduser(hostf, raddrl, luser, ruser) | 391 | __ivaliduser(hostf, raddrl, luser, ruser) |
| 392 | FILE *hostf; | 392 | FILE *hostf; |
| 393 | u_long raddrl; | 393 | in_addr_t raddrl; |
| 394 | const char *luser, *ruser; | 394 | const char *luser, *ruser; |
| 395 | { | 395 | { |
| 396 | register char *user, *p; | 396 | register char *user, *p; |
