summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/nlm/nlm_prot_clnt.c2
-rw-r--r--sys/nlm/nlm_prot_impl.c19
-rw-r--r--sys/nlm/nlm_prot_server.c4
-rw-r--r--sys/nlm/nlm_prot_svc.c4
-rw-r--r--sys/nlm/nlm_prot_xdr.c2
-rw-r--r--sys/nlm/sm_inter_xdr.c2
-rw-r--r--sys/rpc/auth_unix.c2
-rw-r--r--sys/rpc/authunix_prot.c2
-rw-r--r--sys/rpc/clnt_dg.c2
-rw-r--r--sys/rpc/clnt_rc.c2
-rw-r--r--sys/rpc/clnt_vc.c2
-rw-r--r--sys/rpc/inet_ntop.c2
-rw-r--r--sys/rpc/inet_pton.c6
-rw-r--r--sys/rpc/rpc_generic.c6
-rw-r--r--sys/rpc/rpcb_clnt.c2
-rw-r--r--sys/rpc/svc.c2
-rw-r--r--sys/rpc/svc_auth_unix.c2
-rw-r--r--sys/rpc/svc_dg.c2
-rw-r--r--sys/rpc/svc_generic.c2
-rw-r--r--sys/rpc/svc_vc.c2
20 files changed, 45 insertions, 24 deletions
diff --git a/sys/nlm/nlm_prot_clnt.c b/sys/nlm/nlm_prot_clnt.c
index b3ae5d8..9a16e32 100644
--- a/sys/nlm/nlm_prot_clnt.c
+++ b/sys/nlm/nlm_prot_clnt.c
@@ -8,7 +8,7 @@
#include <sys/mutex.h>
#include <sys/systm.h>
-#include "nlm_prot.h"
+#include <nlm/nlm_prot.h>
#include <sys/cdefs.h>
#ifndef lint
/*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c
index 528f8a0..a799414 100644
--- a/sys/nlm/nlm_prot_impl.c
+++ b/sys/nlm/nlm_prot_impl.c
@@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$");
#include <sys/lockf.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#if __FreeBSD_version >= 700000
#include <sys/priv.h>
+#endif
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -49,9 +51,9 @@ __FBSDID("$FreeBSD$");
#include <sys/unistd.h>
#include <sys/vnode.h>
-#include "nlm_prot.h"
-#include "sm_inter.h"
-#include "nlm.h"
+#include <nlm/nlm_prot.h>
+#include <nlm/sm_inter.h>
+#include <nlm/nlm.h>
#include <rpc/rpc_com.h>
#include <rpc/rpcb_prot.h>
@@ -79,7 +81,14 @@ SYSCTL_NODE(_vfs_nlm, OID_AUTO, sysid, CTLFLAG_RW, NULL, "");
*/
static int nlm_syscall_offset = SYS_nlm_syscall;
static struct sysent nlm_syscall_prev_sysent;
+#if __FreeBSD_version < 700000
+static struct sysent nlm_syscall_sysent = {
+ (sizeof(struct nlm_syscall_args) / sizeof(register_t)) | SYF_MPSAFE,
+ (sy_call_t *) nlm_syscall
+};
+#else
MAKE_SYSENT(nlm_syscall);
+#endif
static bool_t nlm_syscall_registered = FALSE;
/*
@@ -1209,7 +1218,11 @@ nlm_syscall(struct thread *td, struct nlm_syscall_args *uap)
{
int error;
+#if __FreeBSD_version >= 700000
error = priv_check(td, PRIV_NFS_LOCKD);
+#else
+ error = suser(td);
+#endif
if (error)
return (error);
diff --git a/sys/nlm/nlm_prot_server.c b/sys/nlm/nlm_prot_server.c
index 3e4499d..320680a 100644
--- a/sys/nlm/nlm_prot_server.c
+++ b/sys/nlm/nlm_prot_server.c
@@ -37,8 +37,8 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/systm.h>
-#include "nlm_prot.h"
-#include "nlm.h"
+#include <nlm/nlm_prot.h>
+#include <nlm/nlm.h>
/**********************************************************************/
diff --git a/sys/nlm/nlm_prot_svc.c b/sys/nlm/nlm_prot_svc.c
index eca6d86..3b1a140 100644
--- a/sys/nlm/nlm_prot_svc.c
+++ b/sys/nlm/nlm_prot_svc.c
@@ -28,8 +28,8 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include "nlm_prot.h"
-#include "nlm.h"
+#include <nlm/nlm_prot.h>
+#include <nlm/nlm.h>
#include <sys/cdefs.h>
#ifndef lint
diff --git a/sys/nlm/nlm_prot_xdr.c b/sys/nlm/nlm_prot_xdr.c
index 034cbbc..d0a6c89 100644
--- a/sys/nlm/nlm_prot_xdr.c
+++ b/sys/nlm/nlm_prot_xdr.c
@@ -3,7 +3,7 @@
* It was generated using rpcgen.
*/
-#include "nlm_prot.h"
+#include <nlm/nlm_prot.h>
#include <sys/cdefs.h>
#ifndef lint
/*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
diff --git a/sys/nlm/sm_inter_xdr.c b/sys/nlm/sm_inter_xdr.c
index 5f75432..b225078 100644
--- a/sys/nlm/sm_inter_xdr.c
+++ b/sys/nlm/sm_inter_xdr.c
@@ -3,7 +3,7 @@
* It was generated using rpcgen.
*/
-#include "sm_inter.h"
+#include <nlm/sm_inter.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
diff --git a/sys/rpc/auth_unix.c b/sys/rpc/auth_unix.c
index 5782400..a2f5fd2 100644
--- a/sys/rpc/auth_unix.c
+++ b/sys/rpc/auth_unix.c
@@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/xdr.h>
#include <rpc/auth.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
/* auth_unix.c */
static void authunix_nextverf (AUTH *);
diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c
index 67ab7fb..3092b1f 100644
--- a/sys/rpc/authunix_prot.c
+++ b/sys/rpc/authunix_prot.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/xdr.h>
#include <rpc/auth.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
/* gids compose part of a credential; there may not be more than 16 of them */
#define NGRPS 16
diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c
index 87c4aa4..c66ac50 100644
--- a/sys/rpc/clnt_dg.c
+++ b/sys/rpc/clnt_dg.c
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
#include <sys/uio.h>
#include <rpc/rpc.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
#ifdef _FREEFALL_CONFIG
diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c
index e767410..ab93773 100644
--- a/sys/rpc/clnt_rc.c
+++ b/sys/rpc/clnt_rc.c
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/uio.h>
#include <rpc/rpc.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
static enum clnt_stat clnt_reconnect_call(CLIENT *, rpcproc_t,
xdrproc_t, void *, xdrproc_t, void *, struct timeval);
diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c
index a92d800..5731e1e 100644
--- a/sys/rpc/clnt_vc.c
+++ b/sys/rpc/clnt_vc.c
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
#include <sys/uio.h>
#include <rpc/rpc.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
#define MCALL_MSG_SIZE 24
diff --git a/sys/rpc/inet_ntop.c b/sys/rpc/inet_ntop.c
index 2043be3..d093a97 100644
--- a/sys/rpc/inet_ntop.c
+++ b/sys/rpc/inet_ntop.c
@@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <rpc/types.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
/*%
* WARNING: Don't even consider trying to compile this on a system where
diff --git a/sys/rpc/inet_pton.c b/sys/rpc/inet_pton.c
index 49bf957..943fad7 100644
--- a/sys/rpc/inet_pton.c
+++ b/sys/rpc/inet_pton.c
@@ -27,7 +27,11 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <rpc/types.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
+
+#if __FreeBSD_version < 700000
+#define strchr index
+#endif
/*%
* WARNING: Don't even consider trying to compile this on a system where
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c
index 8d4c80f..ee8ee8a 100644
--- a/sys/rpc/rpc_generic.c
+++ b/sys/rpc/rpc_generic.c
@@ -58,7 +58,11 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <rpc/nettype.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
+
+#if __FreeBSD_version < 700000
+#define strrchr rindex
+#endif
struct handle {
NCONF_HANDLE *nhandle;
diff --git a/sys/rpc/rpcb_clnt.c b/sys/rpc/rpcb_clnt.c
index cf47f70..ac3a312 100644
--- a/sys/rpc/rpcb_clnt.c
+++ b/sys/rpc/rpcb_clnt.c
@@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpcb_clnt.h>
#include <rpc/rpcb_prot.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
static struct timeval tottimeout = { 60, 0 };
static const struct timeval rmttimeout = { 3, 0 };
diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c
index 8be9805..d6d6d78 100644
--- a/sys/rpc/svc.c
+++ b/sys/rpc/svc.c
@@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <rpc/rpcb_clnt.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
#define SVC_VERSQUIET 0x0001 /* keep quiet about vers mismatch */
#define version_keepquiet(xp) ((u_long)(xp)->xp_p3 & SVC_VERSQUIET)
diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c
index 3b6969d..9c6cdd7 100644
--- a/sys/rpc/svc_auth_unix.c
+++ b/sys/rpc/svc_auth_unix.c
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
#define MAX_MACHINE_NAME 255
#define NGRPS 16
diff --git a/sys/rpc/svc_dg.c b/sys/rpc/svc_dg.c
index 08d5947..666b952 100644
--- a/sys/rpc/svc_dg.c
+++ b/sys/rpc/svc_dg.c
@@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
static enum xprt_stat svc_dg_stat(SVCXPRT *);
static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *);
diff --git a/sys/rpc/svc_generic.c b/sys/rpc/svc_generic.c
index 522b413..1f9b2e2 100644
--- a/sys/rpc/svc_generic.c
+++ b/sys/rpc/svc_generic.c
@@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpcb_clnt.h>
#include <rpc/nettype.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
extern int __svc_vc_setflag(SVCXPRT *, int);
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c
index cada252..54edfd0 100644
--- a/sys/rpc/svc_vc.c
+++ b/sys/rpc/svc_vc.c
@@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
-#include "rpc_com.h"
+#include <rpc/rpc_com.h>
static bool_t svc_vc_rendezvous_recv(SVCXPRT *, struct rpc_msg *);
static enum xprt_stat svc_vc_rendezvous_stat(SVCXPRT *);
OpenPOWER on IntegriCloud