summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-10 06:31:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-10 06:31:39 +0000
commit4e3779893f81b3793ff10ee98d705bf5353ad646 (patch)
tree04dbb67cbf73f446f8d5bf9ce8de2de1351c976f
parentd9c3cfb552ce31f1d56ad8bf81c035650ce99f17 (diff)
iruserok() can finally safely use a u_int32_t for the ip addr
-rw-r--r--include/unistd.h5
-rw-r--r--lib/libc/net/rcmd.34
-rw-r--r--lib/libc/net/rcmd.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/include/unistd.h b/include/unistd.h
index ae4f7aa967b..ecb84e849ff 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,5 @@
-/* $NetBSD: unistd.h,v 1.26 1995/11/22 23:07:19 cgd Exp $ */
+/* $OpenBSD: unistd.h,v 1.6 1996/06/10 06:31:34 deraadt Exp $ */
+/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -127,7 +128,7 @@ char *getpass __P((const char *));
char *getusershell __P((void));
char *getwd __P((char *)); /* obsoleted by getcwd() */
int initgroups __P((const char *, gid_t));
-int iruserok __P((u_long, int, const char *, const char *));
+int iruserok __P((u_int32_t, int, const char *, const char *));
int mknod __P((const char *, mode_t, dev_t));
int mkstemp __P((char *));
char *mktemp __P((char *));
diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3
index 4db847c3922..8452e395dba 100644
--- a/lib/libc/net/rcmd.3
+++ b/lib/libc/net/rcmd.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: rcmd.3,v 1.8 1995/02/25 06:20:52 cgd Exp $
+.\" $NetBSD: rcmd.3,v 1.8.6.1 1996/05/28 02:29:22 mrg Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@
.Ft int
.Fn rresvport "int *port"
.Ft int
-.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser"
+.Fn iruserok "u_int32_t raddr" "int superuser" "const char *ruser" "const char *luser"
.Ft int
.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser"
.Sh DESCRIPTION
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 3db3d86400b..b7877635941 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -73,7 +73,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
struct hostent *hp;
struct sockaddr_in sin, from;
fd_set reads;
- long oldmask;
+ int oldmask;
pid_t pid;
int s, lport, timo;
char c;
@@ -280,7 +280,7 @@ ruserok(rhost, superuser, ruser, luser)
*/
int
iruserok(raddr, superuser, ruser, luser)
- u_long raddr;
+ u_int32_t raddr;
int superuser;
const char *ruser, *luser;
{