summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2006-05-29 16:49:43 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2006-05-29 16:49:43 +0000
commit002c5009a287505e40b1a2edec04999ebcabc98e (patch)
tree9bb71d4b289cbb444b9481ddaffb793aa81ff8c4 /sys
parentcbf986586c3749d9c4d3beff78268497a90c3876 (diff)
revert vfs.nfs.privport sysctl, broke a few architectures
requested by deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs.h8
-rw-r--r--sys/nfs/nfs_subs.c18
-rw-r--r--sys/nfs/nfs_vfsops.c5
3 files changed, 11 insertions, 20 deletions
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h
index 8d2960e893d..67ade9fc871 100644
--- a/sys/nfs/nfs.h
+++ b/sys/nfs/nfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs.h,v 1.25 2006/05/28 23:29:32 avsm Exp $ */
+/* $OpenBSD: nfs.h,v 1.26 2006/05/29 16:49:42 avsm Exp $ */
/* $NetBSD: nfs.h,v 1.10.4.1 1996/05/27 11:23:56 fvdl Exp $ */
/*
@@ -221,14 +221,12 @@ struct nfsstats {
*/
#define NFS_NFSSTATS 1 /* struct: struct nfsstats */
#define NFS_NIOTHREADS 2 /* number of i/o threads */
-#define NFS_PRIVPORT 3 /* whether priv ports are needed */
-#define NFS_MAXID 4
+#define NFS_MAXID 3
#define FS_NFS_NAMES { \
{ 0, 0 }, \
{ "nfsstats", CTLTYPE_STRUCT }, \
- { "iothreads", CTLTYPE_INT }, \
- { "privport", CTLTYPE_INT } \
+ { "iothreads", CTLTYPE_INT } \
}
/*
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 3008f177713..713dc101095 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.56 2006/05/28 23:29:32 avsm Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.57 2006/05/29 16:49:42 avsm Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -102,7 +102,6 @@ nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK,
enum vtype nv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON };
enum vtype nv3tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO };
int nfs_ticks;
-int nfs_privport = 1;
/*
* Mapping of old NFS Version 2 RPC numbers to generic numbers.
@@ -1655,15 +1654,12 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
if (error)
return (error);
- if (nfs_privport) {
- saddr = mtod(nam, struct sockaddr_in *);
- if (saddr->sin_family == AF_INET &&
- (ntohs(saddr->sin_port) >= IPPORT_RESERVED ||
- (slp->ns_so->so_type == SOCK_STREAM &&
- ntohs(saddr->sin_port) == 20))) {
- vput(*vpp);
- return (NFSERR_AUTHERR | AUTH_TOOWEAK);
- }
+ saddr = mtod(nam, struct sockaddr_in *);
+ if (saddr->sin_family == AF_INET &&
+ (ntohs(saddr->sin_port) >= IPPORT_RESERVED ||
+ (slp->ns_so->so_type == SOCK_STREAM && ntohs(saddr->sin_port) == 20))) {
+ vput(*vpp);
+ return (NFSERR_AUTHERR | AUTH_TOOWEAK);
}
/*
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 3de3c138504..bc5f927842a 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.61 2006/05/28 23:29:32 avsm Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.62 2006/05/29 16:49:42 avsm Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -70,7 +70,6 @@
extern struct nfsstats nfsstats;
extern int nfs_ticks;
-extern int nfs_privport;
int nfs_sysctl(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
int nfs_checkexp(struct mount *mp, struct mbuf *nam,
@@ -912,8 +911,6 @@ nfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
return rv;
- case NFS_PRIVPORT:
- return(sysctl_int(oldp, oldlenp, newp, newlen, &nfs_privport));
default:
return EOPNOTSUPP;
}