summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-07-24 22:27:35 +0000
committerpeter <peter@FreeBSD.org>2002-07-24 22:27:35 +0000
commitf26018fef5504e2fc0a02c41503a8a60d42fed00 (patch)
treeef692d384979862767ce0a97982ba968672abccb /sys/nfsserver
parent9fbc2019e840f4ed847111de5bc0dcd754ecdef2 (diff)
downloadFreeBSD-src-f26018fef5504e2fc0a02c41503a8a60d42fed00.zip
FreeBSD-src-f26018fef5504e2fc0a02c41503a8a60d42fed00.tar.gz
Fully exterminate nfsd_srvargs and nfsd_cargs. They were either unused
or giant NOP's. There was a credential in srvargs that was giving rwatson some heartburn. :-)
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs.h23
-rw-r--r--sys/nfsserver/nfs_syscalls.c28
2 files changed, 10 insertions, 41 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h
index cbdb54f..1bbc1f4 100644
--- a/sys/nfsserver/nfs.h
+++ b/sys/nfsserver/nfs.h
@@ -99,29 +99,6 @@ struct nfsd_args {
int namelen; /* Length of name */
};
-struct nfsd_srvargs {
- struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */
- uid_t nsd_uid; /* Effective uid mapped to cred */
- u_int32_t nsd_haddr; /* Ip address of client */
- struct xucred nsd_cr; /* Cred. uid maps to */
- u_int nsd_authlen; /* Length of auth string (ret) */
- u_char *nsd_authstr; /* Auth string (ret) */
- u_int nsd_verflen; /* and the verfier */
- u_char *nsd_verfstr;
- struct timeval nsd_timestamp; /* timestamp from verifier */
- u_int32_t nsd_ttl; /* credential ttl (sec) */
-};
-
-struct nfsd_cargs {
- char *ncd_dirp; /* Mount dir path */
- uid_t ncd_authuid; /* Effective uid */
- int ncd_authtype; /* Type of authenticator */
- u_int ncd_authlen; /* Length of authenticator string */
- u_char *ncd_authstr; /* Authenticator string */
- u_int ncd_verflen; /* and the verifier */
- u_char *ncd_verfstr;
-};
-
/*
* XXX to allow amd to include nfs.h without nfsproto.h
*/
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index a65c81d..3af77de 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -103,7 +103,7 @@ SYSCTL_INT(_vfs_nfsrv, OID_AUTO, gatherdelay_v3, CTLFLAG_RW,
static int nfssvc_addsock(struct file *, struct sockaddr *,
struct thread *);
static void nfsrv_zapsock(struct nfssvc_sock *slp);
-static int nfssvc_nfsd(struct nfsd_srvargs *, caddr_t, struct thread *);
+static int nfssvc_nfsd(caddr_t, struct thread *);
/*
* NFS server system calls
@@ -135,7 +135,6 @@ nfssvc(struct thread *td, struct nfssvc_args *uap)
struct file *fp;
struct sockaddr *nam;
struct nfsd_args nfsdarg;
- struct nfsd_srvargs nfsd_srvargs, *nsd = &nfsd_srvargs;
int error;
mtx_lock(&Giant);
@@ -172,10 +171,7 @@ nfssvc(struct thread *td, struct nfssvc_args *uap)
error = nfssvc_addsock(fp, nam, td);
fdrop(fp, td);
} else if (uap->flag & NFSSVC_NFSD) {
- error = copyin(uap->argp, (caddr_t)nsd, sizeof (*nsd));
- if (error)
- return (error);
- error = nfssvc_nfsd(nsd, uap->argp, td);
+ error = nfssvc_nfsd(uap->argp, td);
} else {
error = ENXIO;
}
@@ -282,11 +278,11 @@ nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td)
* until it is killed by a signal.
*/
static int
-nfssvc_nfsd(struct nfsd_srvargs *nsd, caddr_t argp, struct thread *td)
+nfssvc_nfsd(caddr_t argp, struct thread *td)
{
int siz;
struct nfssvc_sock *slp;
- struct nfsd *nfsd = nsd->nsd_nfsd;
+ struct nfsd *nfsd;
struct nfsrv_descript *nd = NULL;
struct mbuf *m, *mreq;
int error = 0, cacherep, s, sotype, writes_todo;
@@ -297,15 +293,12 @@ nfssvc_nfsd(struct nfsd_srvargs *nsd, caddr_t argp, struct thread *td)
cacherep = RC_DOIT;
writes_todo = 0;
#endif
- if (nfsd == NULL) {
- nsd->nsd_nfsd = nfsd = (struct nfsd *)
- malloc(sizeof (struct nfsd), M_NFSD, M_WAITOK | M_ZERO);
- s = splnet();
- nfsd->nfsd_td = td;
- TAILQ_INSERT_TAIL(&nfsd_head, nfsd, nfsd_chain);
- nfs_numnfsd++;
- } else
- s = splnet();
+ nfsd = (struct nfsd *)
+ malloc(sizeof (struct nfsd), M_NFSD, M_WAITOK | M_ZERO);
+ s = splnet();
+ nfsd->nfsd_td = td;
+ TAILQ_INSERT_TAIL(&nfsd_head, nfsd, nfsd_chain);
+ nfs_numnfsd++;
/*
* Loop getting rpc requests until SIGKILL.
@@ -538,7 +531,6 @@ done:
TAILQ_REMOVE(&nfsd_head, nfsd, nfsd_chain);
splx(s);
free((caddr_t)nfsd, M_NFSD);
- nsd->nsd_nfsd = NULL;
if (--nfs_numnfsd == 0)
nfsrv_init(TRUE); /* Reinitialize everything */
return (error);
OpenPOWER on IntegriCloud