Index: usr.sbin/nfsd/nfsd.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/nfsd/nfsd.c,v retrieving revision 1.25 diff -u -r1.25 nfsd.c --- usr.sbin/nfsd/nfsd.c 2002/06/05 01:06:33 1.25 +++ usr.sbin/nfsd/nfsd.c 2002/07/24 21:19:04 @@ -81,8 +81,6 @@ int debug = 0; #endif -struct nfsd_srvargs nsd; - #define MAXNFSDCNT 20 #define DEFNFSDCNT 4 pid_t children[MAXNFSDCNT]; /* PIDs of children */ @@ -833,8 +831,7 @@ int status; status = 0; - nsd.nsd_nfsd = NULL; - if (nfssvc(NFSSVC_NFSD, &nsd) < 0) { + if (nfssvc(NFSSVC_NFSD, NULL) < 0) { syslog(LOG_ERR, "nfssvc: %m"); status = 1; } Index: sys/nfsserver/nfs.h =================================================================== RCS file: /home/ncvs/src/sys/nfsserver/nfs.h,v retrieving revision 1.67 diff -u -r1.67 nfs.h --- sys/nfsserver/nfs.h 2002/07/15 19:40:22 1.67 +++ sys/nfsserver/nfs.h 2002/07/24 21:19:04 @@ -99,29 +99,6 @@ 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 */ Index: sys/nfsserver/nfs_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/nfsserver/nfs_syscalls.c,v retrieving revision 1.77 diff -u -r1.77 nfs_syscalls.c --- sys/nfsserver/nfs_syscalls.c 2002/07/15 19:40:23 1.77 +++ sys/nfsserver/nfs_syscalls.c 2002/07/24 21:19:04 @@ -103,7 +103,7 @@ 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 @@ 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 @@ 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 @@ * 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 @@ 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 @@ 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);