nfs_serv.c (104424) | nfs_serv.c (106264) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 23 unchanged lines hidden (view full) --- 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 37 */ 38 39#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 23 unchanged lines hidden (view full) --- 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 37 */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_serv.c 104424 2002-10-03 21:50:37Z rwatson $"); | 40__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_serv.c 106264 2002-10-31 22:35:03Z jeff $"); |
41 42/* 43 * nfs version 2 and 3 server calls to vnode ops 44 * - these routines generally have 3 phases 45 * 1 - break down and validate rpc request in mbuf list 46 * 2 - do the vnode ops for the request 47 * (surprisingly ?? many are very similar to syscalls in vfs_syscalls.c) 48 * 3 - build the rpc reply in an mbuf list --- 2167 unchanged lines hidden (view full) --- 2216 nfsm_srvwcc_data(fdirfor_ret, &fdirfor, fdiraft_ret, &fdiraft); 2217 nfsm_srvwcc_data(tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft); 2218 } 2219 error = 0; 2220 goto nfsmout; 2221 } 2222 fvp = fromnd.ni_vp; 2223 nfsm_srvmtofh(tfhp); | 41 42/* 43 * nfs version 2 and 3 server calls to vnode ops 44 * - these routines generally have 3 phases 45 * 1 - break down and validate rpc request in mbuf list 46 * 2 - do the vnode ops for the request 47 * (surprisingly ?? many are very similar to syscalls in vfs_syscalls.c) 48 * 3 - build the rpc reply in an mbuf list --- 2167 unchanged lines hidden (view full) --- 2216 nfsm_srvwcc_data(fdirfor_ret, &fdirfor, fdiraft_ret, &fdiraft); 2217 nfsm_srvwcc_data(tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft); 2218 } 2219 error = 0; 2220 goto nfsmout; 2221 } 2222 fvp = fromnd.ni_vp; 2223 nfsm_srvmtofh(tfhp); |
2224 nfsm_strsiz(len2, NFS_MAXNAMLEN); | 2224 nfsm_srvnamesiz(len2); |
2225 cred->cr_uid = saved_uid; 2226 tond.ni_cnd.cn_cred = cred; 2227 tond.ni_cnd.cn_nameiop = RENAME; 2228 tond.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART; 2229 error = nfs_namei(&tond, tfhp, len2, slp, nam, &md, 2230 &dpos, &tdirp, td, FALSE); 2231 if (tdirp) { 2232 if (v3) { --- 312 unchanged lines hidden (view full) --- 2545 } 2546 } 2547 if (error) 2548 goto out; 2549 2550 VATTR_NULL(vap); 2551 if (v3) 2552 nfsm_srvsattr(vap); | 2225 cred->cr_uid = saved_uid; 2226 tond.ni_cnd.cn_cred = cred; 2227 tond.ni_cnd.cn_nameiop = RENAME; 2228 tond.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART; 2229 error = nfs_namei(&tond, tfhp, len2, slp, nam, &md, 2230 &dpos, &tdirp, td, FALSE); 2231 if (tdirp) { 2232 if (v3) { --- 312 unchanged lines hidden (view full) --- 2545 } 2546 } 2547 if (error) 2548 goto out; 2549 2550 VATTR_NULL(vap); 2551 if (v3) 2552 nfsm_srvsattr(vap); |
2553 nfsm_strsiz(len2, NFS_MAXPATHLEN); | 2553 nfsm_srvpathsiz(len2); |
2554 MALLOC(pathcp, caddr_t, len2 + 1, M_TEMP, M_WAITOK); 2555 iv.iov_base = pathcp; 2556 iv.iov_len = len2; 2557 io.uio_resid = len2; 2558 io.uio_offset = 0; 2559 io.uio_iov = &iv; 2560 io.uio_iovcnt = 1; 2561 io.uio_segflg = UIO_SYSSPACE; --- 1507 unchanged lines hidden --- | 2554 MALLOC(pathcp, caddr_t, len2 + 1, M_TEMP, M_WAITOK); 2555 iv.iov_base = pathcp; 2556 iv.iov_len = len2; 2557 io.uio_resid = len2; 2558 io.uio_offset = 0; 2559 io.uio_iov = &iv; 2560 io.uio_iovcnt = 1; 2561 io.uio_segflg = UIO_SYSSPACE; --- 1507 unchanged lines hidden --- |