add proc pointers to appropriate VOP operations
SCCS-vsn: sys/nfs/nfs_serv.c 7.37
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)nfs_serv.c 7.36 (Berkeley) %G%
+ * @(#)nfs_serv.c 7.37 (Berkeley) %G%
#include "param.h"
#include "file.h"
#include "param.h"
#include "file.h"
#include "vnode.h"
#include "mount.h"
#include "mbuf.h"
#include "vnode.h"
#include "mount.h"
#include "mbuf.h"
/*
* nfs getattr service
*/
/*
* nfs getattr service
*/
-nfsrv_getattr(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_getattr(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct nfsv2_fattr *fp;
struct vattr va;
{
register struct nfsv2_fattr *fp;
struct vattr va;
struct vnode *vp;
nfsv2fh_t nfh;
fhandle_t *fhp;
struct vnode *vp;
nfsv2fh_t nfh;
fhandle_t *fhp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
nfsm_srvmtofh(fhp);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
nfsm_srvmtofh(fhp);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, vap, cred, p);
vput(vp);
nfsm_reply(NFSX_FATTR);
nfsm_build(fp, struct nfsv2_fattr *, NFSX_FATTR);
vput(vp);
nfsm_reply(NFSX_FATTR);
nfsm_build(fp, struct nfsv2_fattr *, NFSX_FATTR);
/*
* nfs setattr service
*/
/*
* nfs setattr service
*/
-nfsrv_setattr(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_setattr(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct vattr va;
register struct vattr *vap = &va;
{
struct vattr va;
register struct vattr *vap = &va;
struct vnode *vp;
nfsv2fh_t nfh;
fhandle_t *fhp;
struct vnode *vp;
nfsv2fh_t nfh;
fhandle_t *fhp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
nfsm_disect(sp, struct nfsv2_sattr *, NFSX_SATTR);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
nfsm_disect(sp, struct nfsv2_sattr *, NFSX_SATTR);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
- if (error = nfsrv_access(vp, VWRITE, cred))
+ if (error = nfsrv_access(vp, VWRITE, cred, p))
goto out;
VATTR_NULL(vap);
/*
goto out;
VATTR_NULL(vap);
/*
vap->va_flags = fxdr_unsigned(u_long, sp->sa_atime.tv_usec);
if (sp->sa_mtime.tv_sec != nfs_xdrneg1)
fxdr_time(&sp->sa_mtime, &vap->va_mtime);
vap->va_flags = fxdr_unsigned(u_long, sp->sa_atime.tv_usec);
if (sp->sa_mtime.tv_sec != nfs_xdrneg1)
fxdr_time(&sp->sa_mtime, &vap->va_mtime);
- if (error = VOP_SETATTR(vp, vap, cred)) {
+ if (error = VOP_SETATTR(vp, vap, cred, p)) {
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, vap, cred, p);
out:
vput(vp);
nfsm_reply(NFSX_FATTR);
out:
vput(vp);
nfsm_reply(NFSX_FATTR);
-nfsrv_lookup(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_lookup(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct nfsv2_fattr *fp;
struct nameidata nami;
{
register struct nfsv2_fattr *fp;
struct nameidata nami;
nfsv2fh_t nfh;
fhandle_t *fhp;
register caddr_t cp;
nfsv2fh_t nfh;
fhandle_t *fhp;
register caddr_t cp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, vap, cred, p);
vput(vp);
nfsm_reply(NFSX_FH+NFSX_FATTR);
nfsm_srvfhtom(fhp);
vput(vp);
nfsm_reply(NFSX_FH+NFSX_FATTR);
nfsm_srvfhtom(fhp);
/*
* nfs readlink service
*/
/*
* nfs readlink service
*/
-nfsrv_readlink(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_readlink(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct iovec iv[(NFS_MAXPATHLEN+MLEN-1)/MLEN];
register struct iovec *ivp = iv;
register struct mbuf *mp;
{
struct iovec iv[(NFS_MAXPATHLEN+MLEN-1)/MLEN];
register struct iovec *ivp = iv;
register struct mbuf *mp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
uiop->uio_resid = len;
uiop->uio_rw = UIO_READ;
uiop->uio_segflg = UIO_SYSSPACE;
uiop->uio_resid = len;
uiop->uio_rw = UIO_READ;
uiop->uio_segflg = UIO_SYSSPACE;
+ uiop->uio_procp = (struct proc *)0;
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred)) {
m_freem(mp3);
nfsm_reply(0);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred)) {
m_freem(mp3);
nfsm_reply(0);
tlen = nfsm_rndup(len);
nfsm_adj(mp3, NFS_MAXPATHLEN-tlen, tlen-len);
}
tlen = nfsm_rndup(len);
nfsm_adj(mp3, NFS_MAXPATHLEN-tlen, tlen-len);
}
- nfsm_build(p, u_long *, NFSX_UNSIGNED);
- *p = txdr_unsigned(len);
+ nfsm_build(tl, u_long *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(len);
mb->m_next = mp3;
nfsm_srvdone;
}
mb->m_next = mp3;
nfsm_srvdone;
}
-nfsrv_read(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_read(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct iovec *iv;
struct iovec *iv2;
register struct mbuf *m;
register struct nfsv2_fattr *fp;
{
register struct iovec *iv;
struct iovec *iv2;
register struct mbuf *m;
register struct nfsv2_fattr *fp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
- nfsm_disect(p, u_long *, NFSX_UNSIGNED);
- off = fxdr_unsigned(off_t, *p);
+ nfsm_disect(tl, u_long *, NFSX_UNSIGNED);
+ off = fxdr_unsigned(off_t, *tl);
nfsm_srvstrsiz(cnt, NFS_MAXDATA);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
nfsm_srvstrsiz(cnt, NFS_MAXDATA);
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
- if (error = nfsrv_access(vp, VREAD | VEXEC, cred)) {
+ if (error = nfsrv_access(vp, VREAD | VEXEC, cred, p)) {
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
uiop->uio_resid = cnt;
uiop->uio_rw = UIO_READ;
uiop->uio_segflg = UIO_SYSSPACE;
uiop->uio_resid = cnt;
uiop->uio_rw = UIO_READ;
uiop->uio_segflg = UIO_SYSSPACE;
+ uiop->uio_procp = (struct proc *)0;
error = VOP_READ(vp, uiop, IO_NODELOCKED, cred);
off = uiop->uio_offset;
FREE((caddr_t)iv2, M_TEMP);
error = VOP_READ(vp, uiop, IO_NODELOCKED, cred);
off = uiop->uio_offset;
FREE((caddr_t)iv2, M_TEMP);
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
- if (error = VOP_GETATTR(vp, vap, cred))
+ if (error = VOP_GETATTR(vp, vap, cred, p))
m_freem(m3);
vput(vp);
nfsm_reply(NFSX_FATTR+NFSX_UNSIGNED);
m_freem(m3);
vput(vp);
nfsm_reply(NFSX_FATTR+NFSX_UNSIGNED);
m_freem(m3);
m3 = (struct mbuf *)0;
}
m_freem(m3);
m3 = (struct mbuf *)0;
}
- nfsm_build(p, u_long *, NFSX_UNSIGNED);
- *p = txdr_unsigned(len);
+ nfsm_build(tl, u_long *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(len);
mb->m_next = m3;
nfsm_srvdone;
}
mb->m_next = m3;
nfsm_srvdone;
}
/*
* nfs write service
*/
/*
* nfs write service
*/
-nfsrv_write(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_write(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct iovec *ivp;
register struct mbuf *mp;
{
register struct iovec *ivp;
register struct mbuf *mp;
struct iovec iv[NFS_MAXIOVEC];
struct vattr va;
register struct vattr *vap = &va;
struct iovec iv[NFS_MAXIOVEC];
struct vattr va;
register struct vattr *vap = &va;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
- nfsm_disect(p, u_long *, 4*NFSX_UNSIGNED);
- off = fxdr_unsigned(off_t, *++p);
- p += 2;
- len = fxdr_unsigned(long, *p);
+ nfsm_disect(tl, u_long *, 4*NFSX_UNSIGNED);
+ off = fxdr_unsigned(off_t, *++tl);
+ tl += 2;
+ len = fxdr_unsigned(long, *tl);
if (len > NFS_MAXDATA || len <= 0) {
error = EBADRPC;
nfsm_reply(0);
if (len > NFS_MAXDATA || len <= 0) {
error = EBADRPC;
nfsm_reply(0);
}
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
}
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
- if (error = nfsrv_access(vp, VWRITE, cred)) {
+ if (error = nfsrv_access(vp, VWRITE, cred, p)) {
vput(vp);
nfsm_reply(0);
}
uiop->uio_resid = 0;
uiop->uio_rw = UIO_WRITE;
uiop->uio_segflg = UIO_SYSSPACE;
vput(vp);
nfsm_reply(0);
}
uiop->uio_resid = 0;
uiop->uio_rw = UIO_WRITE;
uiop->uio_segflg = UIO_SYSSPACE;
+ uiop->uio_procp = (struct proc *)0;
/*
* Do up to NFS_MAXIOVEC mbufs of write each iteration of the
* loop until done.
/*
* Do up to NFS_MAXIOVEC mbufs of write each iteration of the
* loop until done.
}
off = uiop->uio_offset;
}
}
off = uiop->uio_offset;
}
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, vap, cred, p);
vput(vp);
nfsm_reply(NFSX_FATTR);
nfsm_build(fp, struct nfsv2_fattr *, NFSX_FATTR);
vput(vp);
nfsm_reply(NFSX_FATTR);
nfsm_build(fp, struct nfsv2_fattr *, NFSX_FATTR);
* nfs create service
* now does a truncate to 0 length via. setattr if it already exists
*/
* nfs create service
* now does a truncate to 0 length via. setattr if it already exists
*/
-nfsrv_create(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_create(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct nfsv2_fattr *fp;
struct vattr va;
{
register struct nfsv2_fattr *fp;
struct vattr va;
struct nameidata nami;
register struct nameidata *ndp = &nami;
register caddr_t cp;
struct nameidata nami;
register struct nameidata *ndp = &nami;
register caddr_t cp;
register long t1;
caddr_t bpos;
long rdev;
register long t1;
caddr_t bpos;
long rdev;
if (error = nfs_namei(ndp, fhp, len, &md, &dpos))
nfsm_reply(0);
VATTR_NULL(vap);
if (error = nfs_namei(ndp, fhp, len, &md, &dpos))
nfsm_reply(0);
VATTR_NULL(vap);
- nfsm_disect(p, u_long *, NFSX_SATTR);
+ nfsm_disect(tl, u_long *, NFSX_SATTR);
/*
* Iff doesn't exist, create it
* otherwise just truncate to 0 length
* should I set the mode too ??
*/
if (ndp->ni_vp == NULL) {
/*
* Iff doesn't exist, create it
* otherwise just truncate to 0 length
* should I set the mode too ??
*/
if (ndp->ni_vp == NULL) {
- vap->va_type = IFTOVT(fxdr_unsigned(u_long, *p));
+ vap->va_type = IFTOVT(fxdr_unsigned(u_long, *tl));
if (vap->va_type == VNON)
vap->va_type = VREG;
if (vap->va_type == VNON)
vap->va_type = VREG;
- vap->va_mode = nfstov_mode(*p);
- rdev = fxdr_unsigned(long, *(p+3));
+ vap->va_mode = nfstov_mode(*tl);
+ rdev = fxdr_unsigned(long, *(tl+3));
if (vap->va_type == VREG || vap->va_type == VSOCK) {
if (vap->va_type == VREG || vap->va_type == VSOCK) {
- if (error = VOP_CREATE(ndp, vap))
+ if (error = VOP_CREATE(ndp, vap, p))
nfsm_reply(0);
} else if (vap->va_type == VCHR || vap->va_type == VBLK ||
vap->va_type == VFIFO) {
nfsm_reply(0);
} else if (vap->va_type == VCHR || vap->va_type == VBLK ||
vap->va_type == VFIFO) {
nfsm_reply(0);
} else
vap->va_rdev = (dev_t)rdev;
nfsm_reply(0);
} else
vap->va_rdev = (dev_t)rdev;
- if (error = VOP_MKNOD(ndp, vap, cred))
+ if (error = VOP_MKNOD(ndp, vap, cred, p))
nfsm_reply(0);
ndp->ni_nameiop = LOOKUP | LOCKLEAF | HASBUF;
if (error = nfs_namei(ndp, fhp, len, &md, &dpos))
nfsm_reply(0);
ndp->ni_nameiop = LOOKUP | LOCKLEAF | HASBUF;
if (error = nfs_namei(ndp, fhp, len, &md, &dpos))
else
vput(ndp->ni_dvp);
vap->va_size = 0;
else
vput(ndp->ni_dvp);
vap->va_size = 0;
- if (error = VOP_SETATTR(vp, vap, cred)) {
+ if (error = VOP_SETATTR(vp, vap, cred, p)) {
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, vap, cred, p);
vput(vp);
nfsm_reply(NFSX_FH+NFSX_FATTR);
nfsm_srvfhtom(fhp);
vput(vp);
nfsm_reply(NFSX_FH+NFSX_FATTR);
nfsm_srvfhtom(fhp);
/*
* nfs remove service
*/
/*
* nfs remove service
*/
-nfsrv_remove(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_remove(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct nameidata nami;
register struct nameidata *ndp = &nami;
{
struct nameidata nami;
register struct nameidata *ndp = &nami;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
#endif
out:
if (!error) {
#endif
out:
if (!error) {
- error = VOP_REMOVE(ndp);
+ error = VOP_REMOVE(ndp, p);
} else {
VOP_ABORTOP(ndp);
if (ndp->ni_dvp == vp)
} else {
VOP_ABORTOP(ndp);
if (ndp->ni_dvp == vp)
/*
* nfs rename service
*/
/*
* nfs rename service
*/
-nfsrv_rename(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_rename(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct nameidata *ndp;
{
register struct nameidata *ndp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
error = EINVAL;
out:
if (!error) {
error = EINVAL;
out:
if (!error) {
- error = VOP_RENAME(ndp, &tond);
+ error = VOP_RENAME(ndp, &tond, p);
} else {
VOP_ABORTOP(&tond);
if (tdvp == tvp)
} else {
VOP_ABORTOP(&tond);
if (tdvp == tvp)
-nfsrv_link(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_link(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct nameidata nami;
register struct nameidata *ndp = &nami;
{
struct nameidata nami;
register struct nameidata *ndp = &nami;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
error = EXDEV;
out:
if (!error) {
error = EXDEV;
out:
if (!error) {
- error = VOP_LINK(vp, ndp);
+ error = VOP_LINK(vp, ndp, p);
} else {
VOP_ABORTOP(ndp);
if (ndp->ni_dvp == ndp->ni_vp)
} else {
VOP_ABORTOP(ndp);
if (ndp->ni_dvp == ndp->ni_vp)
/*
* nfs symbolic link service
*/
/*
* nfs symbolic link service
*/
-nfsrv_symlink(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_symlink(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct vattr va;
struct nameidata nami;
register struct nameidata *ndp = &nami;
register struct vattr *vap = &va;
{
struct vattr va;
struct nameidata nami;
register struct nameidata *ndp = &nami;
register struct vattr *vap = &va;
register long t1;
struct nfsv2_sattr *sp;
caddr_t bpos;
register long t1;
struct nfsv2_sattr *sp;
caddr_t bpos;
io.uio_iovcnt = 1;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
io.uio_iovcnt = 1;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
+ io.uio_procp = (struct proc *)0;
nfsm_mtouio(&io, len2);
nfsm_disect(sp, struct nfsv2_sattr *, NFSX_SATTR);
*(pathcp + len2) = '\0';
nfsm_mtouio(&io, len2);
nfsm_disect(sp, struct nfsv2_sattr *, NFSX_SATTR);
*(pathcp + len2) = '\0';
}
VATTR_NULL(vap);
vap->va_mode = fxdr_unsigned(u_short, sp->sa_mode);
}
VATTR_NULL(vap);
vap->va_mode = fxdr_unsigned(u_short, sp->sa_mode);
- error = VOP_SYMLINK(ndp, vap, pathcp);
+ error = VOP_SYMLINK(ndp, vap, pathcp, p);
out:
if (pathcp)
FREE(pathcp, M_TEMP);
out:
if (pathcp)
FREE(pathcp, M_TEMP);
/*
* nfs mkdir service
*/
/*
* nfs mkdir service
*/
-nfsrv_mkdir(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_mkdir(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct vattr va;
register struct vattr *vap = &va;
{
struct vattr va;
register struct vattr *vap = &va;
struct nameidata nami;
register struct nameidata *ndp = &nami;
register caddr_t cp;
struct nameidata nami;
register struct nameidata *ndp = &nami;
register caddr_t cp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
ndp->ni_nameiop = CREATE | LOCKPARENT | SAVESTARTDIR;
if (error = nfs_namei(ndp, fhp, len, &md, &dpos))
nfsm_reply(0);
ndp->ni_nameiop = CREATE | LOCKPARENT | SAVESTARTDIR;
if (error = nfs_namei(ndp, fhp, len, &md, &dpos))
nfsm_reply(0);
- nfsm_disect(p, u_long *, NFSX_UNSIGNED);
+ nfsm_disect(tl, u_long *, NFSX_UNSIGNED);
VATTR_NULL(vap);
vap->va_type = VDIR;
VATTR_NULL(vap);
vap->va_type = VDIR;
- vap->va_mode = nfstov_mode(*p++);
+ vap->va_mode = nfstov_mode(*tl++);
vp = ndp->ni_vp;
if (vp != NULL) {
VOP_ABORTOP(ndp);
vp = ndp->ni_vp;
if (vp != NULL) {
VOP_ABORTOP(ndp);
error = EEXIST;
nfsm_reply(0);
}
error = EEXIST;
nfsm_reply(0);
}
- error = VOP_MKDIR(ndp, vap);
+ error = VOP_MKDIR(ndp, vap, p);
vrele(ndp->ni_startdir);
if (error)
nfsm_reply(0);
vrele(ndp->ni_startdir);
if (error)
nfsm_reply(0);
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, vap, cred, p);
vput(vp);
nfsm_reply(NFSX_FH+NFSX_FATTR);
nfsm_srvfhtom(fhp);
vput(vp);
nfsm_reply(NFSX_FH+NFSX_FATTR);
nfsm_srvfhtom(fhp);
/*
* nfs rmdir service
*/
/*
* nfs rmdir service
*/
-nfsrv_rmdir(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_rmdir(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf *mrep, *md, **mrq;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
struct nameidata nami;
register struct nameidata *ndp = &nami;
{
struct nameidata nami;
register struct nameidata *ndp = &nami;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
error = EBUSY;
out:
if (!error) {
error = EBUSY;
out:
if (!error) {
- error = VOP_RMDIR(ndp);
+ error = VOP_RMDIR(ndp, p);
} else {
VOP_ABORTOP(ndp);
if (ndp->ni_dvp == ndp->ni_vp)
} else {
VOP_ABORTOP(ndp);
if (ndp->ni_dvp == ndp->ni_vp)
/*
* nfs readdir service
* - mallocs what it thinks is enough to read
/*
* nfs readdir service
* - mallocs what it thinks is enough to read
- * count rounded up to a multiple of DIRBLKSIZ <= NFS_MAXREADDIR
+ * count rounded up to a multiple of NFS_DIRBLKSIZ <= NFS_MAXREADDIR
* - calls VOP_READDIR()
* - loops around building the reply
* if the output generated exceeds count break out of loop
* - calls VOP_READDIR()
* - loops around building the reply
* if the output generated exceeds count break out of loop
* to including the status longwords that are not a part of the dir.
* "entry" structures, but are in the rpc.
*/
* to including the status longwords that are not a part of the dir.
* "entry" structures, but are in the rpc.
*/
-nfsrv_readdir(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_readdir(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register char *bp, *be;
register struct mbuf *mp;
register struct direct *dp;
register caddr_t cp;
{
register char *bp, *be;
register struct mbuf *mp;
register struct direct *dp;
register caddr_t cp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
- nfsm_disect(p, u_long *, 2*NFSX_UNSIGNED);
- toff = fxdr_unsigned(off_t, *p++);
- off = (toff & ~(DIRBLKSIZ-1));
- on = (toff & (DIRBLKSIZ-1));
- cnt = fxdr_unsigned(int, *p);
- siz = ((cnt+DIRBLKSIZ-1) & ~(DIRBLKSIZ-1));
+ nfsm_disect(tl, u_long *, 2*NFSX_UNSIGNED);
+ toff = fxdr_unsigned(off_t, *tl++);
+ off = (toff & ~(NFS_DIRBLKSIZ-1));
+ on = (toff & (NFS_DIRBLKSIZ-1));
+ cnt = fxdr_unsigned(int, *tl);
+ siz = ((cnt+NFS_DIRBLKSIZ-1) & ~(NFS_DIRBLKSIZ-1));
if (cnt > NFS_MAXREADDIR)
siz = NFS_MAXREADDIR;
fullsiz = siz;
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
if (cnt > NFS_MAXREADDIR)
siz = NFS_MAXREADDIR;
fullsiz = siz;
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
- if (error = nfsrv_access(vp, VEXEC, cred)) {
+ if (error = nfsrv_access(vp, VEXEC, cred, p)) {
vput(vp);
nfsm_reply(0);
}
vput(vp);
nfsm_reply(0);
}
io.uio_resid = fullsiz;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
io.uio_resid = fullsiz;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
+ io.uio_procp = (struct proc *)0;
error = VOP_READDIR(vp, &io, cred, &eofflag);
off = io.uio_offset;
if (error) {
error = VOP_READDIR(vp, &io, cred, &eofflag);
off = io.uio_offset;
if (error) {
if (siz == 0) {
vrele(vp);
nfsm_reply(2*NFSX_UNSIGNED);
if (siz == 0) {
vrele(vp);
nfsm_reply(2*NFSX_UNSIGNED);
- nfsm_build(p, u_long *, 2*NFSX_UNSIGNED);
- *p++ = nfs_false;
- *p = nfs_true;
+ nfsm_build(tl, u_long *, 2*NFSX_UNSIGNED);
+ *tl++ = nfs_false;
+ *tl = nfs_true;
FREE((caddr_t)rbuf, M_TEMP);
return (0);
}
FREE((caddr_t)rbuf, M_TEMP);
return (0);
}
/* Build the directory record xdr from the direct entry */
nfsm_clget;
/* Build the directory record xdr from the direct entry */
nfsm_clget;
bp += NFSX_UNSIGNED;
nfsm_clget;
bp += NFSX_UNSIGNED;
nfsm_clget;
- *p = txdr_unsigned(dp->d_ino);
+ *tl = txdr_unsigned(dp->d_ino);
bp += NFSX_UNSIGNED;
nfsm_clget;
bp += NFSX_UNSIGNED;
nfsm_clget;
- *p = txdr_unsigned(nlen);
+ *tl = txdr_unsigned(nlen);
bp += NFSX_UNSIGNED;
/* And loop arround copying the name */
bp += NFSX_UNSIGNED;
/* And loop arround copying the name */
/* Finish off the record */
toff += dp->d_reclen;
/* Finish off the record */
toff += dp->d_reclen;
- *p = txdr_unsigned(toff);
+ *tl = txdr_unsigned(toff);
bp += NFSX_UNSIGNED;
} else
toff += dp->d_reclen;
bp += NFSX_UNSIGNED;
} else
toff += dp->d_reclen;
dp = (struct direct *)cpos;
}
nfsm_clget;
dp = (struct direct *)cpos;
}
nfsm_clget;
bp += NFSX_UNSIGNED;
nfsm_clget;
if (eofflag)
bp += NFSX_UNSIGNED;
nfsm_clget;
if (eofflag)
bp += NFSX_UNSIGNED;
if (bp < be)
mp->m_len = bp-mtod(mp, caddr_t);
bp += NFSX_UNSIGNED;
if (bp < be)
mp->m_len = bp-mtod(mp, caddr_t);
/*
* nfs statfs service
*/
/*
* nfs statfs service
*/
-nfsrv_statfs(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_statfs(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
register struct statfs *sf;
register struct nfsv2_statfs *sfp;
{
register struct statfs *sf;
register struct nfsv2_statfs *sfp;
register long t1;
caddr_t bpos;
int error = 0;
register long t1;
caddr_t bpos;
int error = 0;
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
sf = &statfs;
if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
nfsm_reply(0);
sf = &statfs;
- error = VFS_STATFS(vp->v_mount, sf);
+ error = VFS_STATFS(vp->v_mount, sf, p);
vput(vp);
nfsm_reply(NFSX_STATFS);
nfsm_build(sfp, struct nfsv2_statfs *, NFSX_STATFS);
vput(vp);
nfsm_reply(NFSX_STATFS);
nfsm_build(sfp, struct nfsv2_statfs *, NFSX_STATFS);
* Null operation, used by clients to ping server
*/
/* ARGSUSED */
* Null operation, used by clients to ping server
*/
/* ARGSUSED */
-nfsrv_null(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_null(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
caddr_t bpos;
int error = 0;
{
caddr_t bpos;
int error = 0;
* No operation, used for obsolete procedures
*/
/* ARGSUSED */
* No operation, used for obsolete procedures
*/
/* ARGSUSED */
-nfsrv_noop(mrep, md, dpos, cred, xid, mrq, repstat)
+nfsrv_noop(mrep, md, dpos, cred, xid, mrq, repstat, p)
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
struct mbuf **mrq;
struct mbuf *mrep, *md;
caddr_t dpos;
struct ucred *cred;
u_long xid;
int *repstat;
{
caddr_t bpos;
int error = 0;
{
caddr_t bpos;
int error = 0;
* this because it opens a security hole, but since the nfs server opens
* a security hole the size of a barn door anyhow, what the heck.
*/
* this because it opens a security hole, but since the nfs server opens
* a security hole the size of a barn door anyhow, what the heck.
*/
-nfsrv_access(vp, flags, cred)
+nfsrv_access(vp, flags, cred, p)
register struct vnode *vp;
int flags;
register struct ucred *cred;
register struct vnode *vp;
int flags;
register struct ucred *cred;
{
struct vattr vattr;
int error;
{
struct vattr vattr;
int error;
return (ETXTBSY);
#endif
}
return (ETXTBSY);
#endif
}
- if (error = VOP_GETATTR(vp, &vattr, cred))
+ if (error = VOP_GETATTR(vp, &vattr, cred, p))
- if ((error = VOP_ACCESS(vp, flags, cred)) &&
+ if ((error = VOP_ACCESS(vp, flags, cred, p)) &&
cred->cr_uid != vattr.va_uid)
return (error);
return (0);
cred->cr_uid != vattr.va_uid)
return (error);
return (0);