Lines Matching defs:ctx
256 * vfs_context_t ctx - VFS context
277 vfs_context_t ctx,
310 error = nfsrv_credcheck(nd, ctx, nx, nxo);
323 if (nfsrv_authorize(vp, NULL, testaction, ctx, nxo, 0))
328 nfsrv_authorize(vp, NULL, KAUTH_VNODE_SEARCH, ctx, nxo, 0)))
340 if (nfsrv_authorize(vp, NULL, testaction, ctx, nxo, 0))
353 if (nfsrv_authorize(vp, NULL, testaction, ctx, nxo, 0))
370 nfsrv_authorize(vp, NULL, KAUTH_VNODE_EXECUTE, ctx, nxo, 0)))
375 attrerr = vnode_getattr(vp, &vattr, ctx);
405 vfs_context_t ctx,
433 error = nfsrv_credcheck(nd, ctx, nx, nxo);
437 error = vnode_getattr(vp, &vattr, ctx);
467 vfs_context_t ctx,
520 error = nfsrv_credcheck(nd, ctx, nx, nxo);
525 error = preattrerr = vnode_getattr(vp, &preattr, ctx);
547 error = vnode_authattr(vp, vap, &action, ctx);
549 error = nfsrv_authorize(vp, NULL, action, ctx, nxo, 0);
553 error = vnode_setattr(vp, vap, ctx);
557 postattrerr = vnode_getattr(vp, &postattr, ctx);
593 vfs_context_t ctx,
626 error = nfsrv_namei(nd, ctx, &ni, &dnfh, &dirp, &nx, &nxo);
639 dirattrerr = vnode_getattr(dirp, &dirattr, ctx);
648 error = nfsrv_vptofh(nx, nd->nd_vers, (isdotdot ? &dnfh : NULL), vp, ctx, &nfh);
651 attrerr = vnode_getattr(vp, vap, ctx);
690 vfs_context_t ctx,
744 error = nfsrv_credcheck(nd, ctx, nx, nxo);
755 error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_READ_DATA, ctx, nxo, 0);
757 error = VNOP_READLINK(vp, auio, ctx);
761 attrerr = vnode_getattr(vp, &vattr, ctx);
816 vfs_context_t ctx,
860 error = nfsrv_credcheck(nd, ctx, nx, nxo);
871 if ((error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_READ_DATA, ctx, nxo, 1)))
872 error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_EXECUTE, ctx, nxo, 1);
875 attrerr = vnode_getattr(vp, vap, ctx);
902 error = VNOP_READ(vp, auio, IO_NODELOCKED, ctx);
914 attrerr = vnode_getattr(vp, vap, ctx);
1099 nfsrv_modified(vnode_t vp, vfs_context_t ctx)
1144 kauth_cred_ref(vfs_context_ucred(ctx));
1145 fp->fm_context = *ctx;
1172 vfs_context_t ctx,
1243 error = nfsrv_credcheck(nd, ctx, nx, nxo);
1248 preattrerr = vnode_getattr(vp, &preattr, ctx);
1257 error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_WRITE_DATA, ctx, nxo, 1);
1285 error = VNOP_WRITE(vp, auio, ioflags, ctx);
1296 nfsrv_modified(vp, ctx);
1300 postattrerr = vnode_getattr(vp, &postattr, ctx);
1370 vfs_context_t ctx,
1522 error = nfsrv_credcheck(nd, ctx, nx, nxo);
1529 preattrerr = vnode_getattr(vp, &preattr, ctx);
1540 error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_WRITE_DATA, ctx, nxo, 1);
1564 error = VNOP_WRITE(vp, auio, ioflags, ctx);
1574 nfsrv_modified(vp, ctx);
1584 postattrerr = vnode_getattr(vp, &postattr, ctx);
1809 vfs_context_t ctx,
1850 error = nfsrv_namei(nd, ctx, &ni, &nfh, &dirp, &nx, &nxo);
1862 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
1930 error = nfsrv_authorize(dvp, NULL, KAUTH_VNODE_ADD_FILE, ctx, nxo, 0);
1938 ctx);
1955 error = vnode_authattr_new(dvp, vap, 0, ctx);
1960 error = VNOP_CREATE(dvp, &vp, &ni.ni_cnd, vap, ctx);
1967 error = vnode_setattr_fallback(vp, vap, ctx);
1981 error = vnode_setattr(vp, vap, ctx);
1986 add_fsevent(FSE_CREATE_FILE, ctx,
2003 error = VNOP_MKNOD(dvp, &vp, &ni.ni_cnd, vap, ctx);
2020 ni.ni_cnd.cn_context = ctx;
2058 ctx, nxo, 0);
2063 error = vnode_setattr(vp, vap, ctx);
2068 error = nfsrv_vptofh(nx, nd->nd_vers, NULL, vp, ctx, &nfh);
2071 postattrerr = vnode_getattr(vp, &postattr, ctx);
2084 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
2138 vfs_context_t ctx,
2178 error = nfsrv_namei(nd, ctx, &ni, &nfh, &dirp, &nx, &nxo);
2189 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
2227 error = nfsrv_authorize(dvp, NULL, KAUTH_VNODE_ADD_FILE, ctx, nxo, 0);
2235 ctx);
2252 error = vnode_authattr_new(dvp, vap, 0, ctx);
2258 error = VNOP_CREATE(dvp, &vp, &ni.ni_cnd, vap, ctx);
2265 error = vnode_setattr_fallback(vp, vap, ctx);
2269 if ((error = VNOP_MKNOD(dvp, &vp, &ni.ni_cnd, vap, ctx)))
2311 error = nfsrv_vptofh(nx, NFS_VER3, NULL, vp, ctx, &nfh);
2314 postattrerr = vnode_getattr(vp, &postattr, ctx);
2323 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
2374 vfs_context_t ctx,
2407 error = nfsrv_namei(nd, ctx, &ni, &nfh, &dirp, &nx, &nxo);
2419 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
2438 error = nfsrv_authorize(vp, dvp, KAUTH_VNODE_DELETE, ctx, nxo, 0);
2449 get_fse_info(vp, &finfo, ctx);
2456 error = VNOP_REMOVE(dvp, vp, &ni.ni_cnd, 0, ctx);
2461 add_fsevent(FSE_DELETE, ctx,
2483 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
2512 vfs_context_t ctx,
2594 error = nfsrv_namei(nd, ctx, &fromni, &fnfh, &fdirp, &fnx, &fnxo);
2603 fdpreattrerr = vnode_getattr(fdirp, &fdpreattr, ctx);
2615 ctx->vc_ucred = nd->nd_cr = saved_cred;
2633 error = nfsrv_namei(nd, ctx, &toni, &tnfh, &tdirp, &tnx, &tnxo);
2664 tdpreattrerr = vnode_getattr(tdirp, &tdpreattr, ctx);
2727 if ((error = nfsrv_authorize(fvp, fdvp, KAUTH_VNODE_DELETE, ctx, fnxo, 0)) != 0)
2733 ctx, tnxo, 0)) != 0)
2739 ctx, fnxo, 0)) != 0)
2744 ((error = nfsrv_authorize(tvp, tdvp, KAUTH_VNODE_DELETE, ctx, tnxo, 0)) != 0))
2905 ctx->vc_ucred = nd->nd_cr = saved_cred;
2941 get_fse_info(fvp, &from_finfo, ctx);
2943 get_fse_info(tvp, &to_finfo, ctx);
2969 toni.ni_dvp, toni.ni_vp, &toni.ni_cnd, ctx);
2992 add_fsevent(FSE_RENAME, ctx,
2999 add_fsevent(FSE_RENAME, ctx,
3046 fdpostattrerr = vnode_getattr(fdirp, &fdpostattr, ctx);
3052 tdpostattrerr = vnode_getattr(tdirp, &tdpostattr, ctx);
3122 vfs_context_t ctx,
3155 error = nfsrv_credcheck(nd, ctx, nx, nxo);
3165 if ((error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_LINKTARGET, ctx, nxo, 0)) != 0)
3175 error = nfsrv_namei(nd, ctx, &ni, &dnfh, &dirp, &nx, &nxo);
3179 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
3195 error = nfsrv_authorize(dvp, NULL, KAUTH_VNODE_ADD_FILE, ctx, nxo, 0);
3198 error = VNOP_LINK(vp, dvp, &ni.ni_cnd, ctx);
3211 if (get_fse_info(vp, &finfo, ctx) == 0) {
3215 add_fsevent(FSE_CREATE_FILE, ctx,
3238 attrerr = vnode_getattr(vp, &attr, ctx);
3242 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
3279 vfs_context_t ctx,
3321 error = nfsrv_namei(nd, ctx, &ni, &nfh, &dirp, &nx, &nxo);
3333 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
3385 error = nfsrv_authorize(dvp, NULL, KAUTH_VNODE_ADD_FILE, ctx, nxo, 0);
3389 error = vnode_authattr_new(dvp, vap, 0, ctx);
3392 error = VNOP_SYMLINK(dvp, &vp, &ni.ni_cnd, vap, linkdata, ctx);
3402 ni.ni_cnd.cn_context = ctx;
3415 error = nfsrv_vptofh(nx, NFS_VER3, NULL, vp, ctx, &nfh);
3418 postattrerr = vnode_getattr(vp, &postattr, ctx);
3425 add_fsevent(FSE_CREATE_FILE, ctx,
3447 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
3500 vfs_context_t ctx,
3538 error = nfsrv_namei(nd, ctx, &ni, &nfh, &dirp, &nx, &nxo);
3550 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
3580 error = nfsrv_authorize(dvp, NULL, KAUTH_VNODE_ADD_SUBDIRECTORY, ctx, nxo, 0);
3588 ctx);
3613 error = vnode_authattr_new(dvp, vap, 0, ctx);
3622 error = VNOP_MKDIR(dvp, &vp, &ni.ni_cnd, vap, ctx);
3626 add_fsevent(FSE_CREATE_DIR, ctx, FSE_ARG_VNODE, vp, FSE_ARG_DONE);
3634 error = vnode_setattr_fallback(vp, vap, ctx);
3640 error = nfsrv_vptofh(nx, nd->nd_vers, NULL, vp, ctx, &nfh);
3643 postattrerr = vnode_getattr(vp, &postattr, ctx);
3661 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
3714 vfs_context_t ctx,
3748 error = nfsrv_namei(nd, ctx, &ni, &nfh, &dirp, &nx, &nxo);
3760 dpreattrerr = vnode_getattr(dirp, &dpreattr, ctx);
3788 error = nfsrv_authorize(vp, dvp, KAUTH_VNODE_DELETE, ctx, nxo, 0);
3798 get_fse_info(vp, &finfo, ctx);
3806 error = VNOP_RMDIR(dvp, vp, &ni.ni_cnd, ctx);
3811 add_fsevent(FSE_DELETE, ctx,
3831 dpostattrerr = vnode_getattr(dirp, &dpostattr, ctx);
3888 vfs_context_t ctx,
3942 error = nfsrv_credcheck(nd, ctx, nx, nxo);
3953 error = attrerr = vnode_getattr(vp, &attr, ctx);
3958 error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_LIST_DIRECTORY, ctx, nxo, 0);
3973 error = VNOP_READDIR(vp, auio, vnopflag, &eofflag, &nentries, ctx);
3978 attrerr = vnode_getattr(vp, &attr, ctx);
4110 vfs_context_t ctx,
4165 error = nfsrv_credcheck(nd, ctx, nx, nxo);
4175 error = attrerr = vnode_getattr(vp, &attr, ctx);
4179 error = nfsrv_authorize(vp, NULL, KAUTH_VNODE_LIST_DIRECTORY, ctx, nxo, 0);
4195 error = VNOP_READDIR(vp, auio, vnopflag, &eofflag, &nentries, ctx);
4198 attrerr = vnode_getattr(vp, &attr, ctx);
4247 if ((error = VFS_VGET(vnode_mount(vp), (ino64_t)dp->d_fileno, &nvp, ctx))) {
4275 if (VFS_VGET(vnode_mount(vp), (ino64_t)dp->d_fileno, &nvp, ctx)) {
4281 if (nfsrv_vptofh(nx, 0, (isdotdot ? &dnfh : NULL), nvp, ctx, &nfh))
4284 if (vnode_getattr(nvp, vap, ctx))
4357 vfs_context_t ctx,
4394 error = nfsrv_credcheck(nd, ctx, nx, nxo);
4398 preattrerr = vnode_getattr(vp, &preattr, ctx);
4400 error = VNOP_FSYNC(vp, MNT_WAIT, ctx);
4403 postattrerr = vnode_getattr(vp, &postattr, ctx);
4437 vfs_context_t ctx,
4468 error = nfsrv_credcheck(nd, ctx, nx, nxo);
4476 error = vfs_getattr(vnode_mount(vp), &va, ctx);
4481 attrerr = vnode_getattr(vp, &attr, ctx);
4529 vfs_context_t ctx,
4557 error = nfsrv_credcheck(nd, ctx, nx, nxo);
4561 attrerr = vnode_getattr(vp, &attr, ctx);
4617 vfs_context_t ctx,
4646 error = nfsrv_credcheck(nd, ctx, nx, nxo);
4649 error = VNOP_PATHCONF(vp, _PC_LINK_MAX, &linkmax, ctx);
4651 error = VNOP_PATHCONF(vp, _PC_NAME_MAX, &namemax, ctx);
4653 error = VNOP_PATHCONF(vp, _PC_CHOWN_RESTRICTED, &chownres, ctx);
4655 error = VNOP_PATHCONF(vp, _PC_NO_TRUNC, ¬runc, ctx);
4657 error = VNOP_PATHCONF(vp, _PC_CASE_SENSITIVE, &case_sensitive, ctx);
4659 error = VNOP_PATHCONF(vp, _PC_CASE_PRESERVING, &case_preserving, ctx);
4662 attrerr = vnode_getattr(vp, &attr, ctx);
4701 __unused vfs_context_t ctx,
4737 __unused vfs_context_t ctx,
4766 vfs_context_t ctx,
4812 vfs_context_t ctx,
4834 error = vnode_authorize(vp, dvp, action, ctx);
4842 if ((vnode_getattr(vp, &vattr, ctx) == 0) &&
4843 (kauth_cred_getuid(vfs_context_ucred(ctx)) == vattr.va_uid))