Lines Matching defs:ctx
119 static int vn_closefile(struct fileglob *fp, vfs_context_t ctx);
121 vfs_context_t ctx);
123 vfs_context_t ctx);
125 vfs_context_t ctx);
127 vfs_context_t ctx);
129 vfs_context_t ctx);
132 static int vn_open_auth_finish(vnode_t vp, int fmode, vfs_context_t ctx);
135 vfs_context_t ctx);
172 vn_open_auth_finish(vnode_t vp, int fmode, vfs_context_t ctx)
184 mac_vnode_notify_open(ctx, vp, fmode);
186 kauth_authorize_fileop(vfs_context_ucred(ctx), KAUTH_FILEOP_OPEN,
201 vn_open_auth_do_create(struct nameidata *ndp, struct vnode_attr *vap, int fmode, boolean_t *did_create, boolean_t *did_open, vfs_context_t ctx)
218 if ((error = vn_authorize_create(dvp, &ndp->ni_cnd, vap, ctx, NULL)) != 0)
220 if ((error = vnode_makenamedstream(dvp, &ndp->ni_vp, XATTR_RESOURCEFORK_NAME, 0, ctx)) != 0)
226 if ((error = vn_authorize_create(dvp, &ndp->ni_cnd, vap, ctx, NULL)) != 0)
230 error = vn_create(dvp, &ndp->ni_vp, ndp, vap, VN_CREATE_DOOPEN, fmode, &status, ctx);
291 add_fsevent(FSE_CREATE_FILE, ctx,
356 vfs_context_t ctx = ndp->ni_cnd.cn_context;
420 error = vn_open_auth_do_create(ndp, vap, fmode, &did_create, &did_open, ctx);
467 error = VNOP_COMPOUND_OPEN(dvp, &ndp->ni_vp, ndp, 0, fmode, NULL, NULL, ctx);
520 error = VNOP_COMPOUND_OPEN(dvp, &ndp->ni_vp, ndp, 0, fmode, NULL, NULL, ctx);
560 error = vn_authorize_open_existing(vp, &ndp->ni_cnd, fmode, ctx, NULL);
585 error = VNOP_OPEN(vp, fmode, ctx);
607 error = vn_open_auth_finish(vp, fmode, ctx);
623 VNOP_CLOSE(vp, fmode, ctx);
684 vn_close(struct vnode *vp, int flags, vfs_context_t ctx)
694 (void) vnode_flushnamedstream(vp->v_parent, vp, ctx);
703 error = VNOP_CLOSE(vp, flags, ctx);
708 add_fsevent(FSE_CONTENT_MODIFIED, ctx,
888 vn_read(struct fileproc *fp, struct uio *uio, int flags, vfs_context_t ctx)
900 error = mac_vnode_check_read(ctx, vfs_context_ucred(ctx), vp);
928 error = VNOP_READ(vp, uio, ioflag, ctx);
942 vn_write(struct fileproc *fp, struct uio *uio, int flags, vfs_context_t ctx)
950 proc_t p = vfs_context_proc(ctx);
959 error = mac_vnode_check_write(ctx, vfs_context_ucred(ctx), vp);
1000 vfs_context_proc(ctx) && (vp->v_type == VREG) &&
1043 error = VNOP_WRITE(vp, uio, ioflag, ctx);
1088 vn_stat_noauth(struct vnode *vp, void *sbptr, kauth_filesec_t *xsec, int isstat64, vfs_context_t ctx)
1126 error = vnode_getattr(vp, &va, ctx);
1235 if (va.va_gen && !vfs_context_issuser(ctx)) {
1255 vn_stat(struct vnode *vp, void *sb, kauth_filesec_t *xsec, int isstat64, vfs_context_t ctx)
1260 error = mac_vnode_check_stat(ctx, NOCRED, vp);
1266 if ((error = vnode_authorize(vp, NULL, KAUTH_VNODE_READ_ATTRIBUTES | KAUTH_VNODE_READ_SECURITY, ctx)) != 0)
1270 return(vn_stat_noauth(vp, sb, xsec, isstat64, ctx));
1278 vn_ioctl(struct fileproc *fp, u_long com, caddr_t data, vfs_context_t ctx)
1292 error = mac_vnode_check_ioctl(ctx, vp, com);
1301 if ((error = vnode_size(vp, &file_size, ctx)) != 0)
1345 error = VNOP_IOCTL(vp, com, data, fp->f_fglob->fg_flag, ctx);
1354 sessp = proc_session(vfs_context_proc(ctx));
1377 vn_select(struct fileproc *fp, int which, void *wql, __unused vfs_context_t ctx)
1393 error = mac_vnode_check_select(ctx, vp, which);
1396 error = VNOP_SELECT(vp, which, fp->f_fglob->fg_flag, wql, ctx);
1408 vn_closefile(struct fileglob *fg, vfs_context_t ctx)
1422 (void)VNOP_ADVLOCK(vp, (caddr_t)fg, F_UNLCK, &lf, F_FLOCK, ctx);
1424 error = vn_close(vp, fg->fg_flag, ctx);
1436 vn_pathconf(vnode_t vp, int name, int32_t *retval, vfs_context_t ctx)
1492 if (vfs_getattr(vnode_mount(vp), &vfa, ctx) == 0 &&
1497 error = VNOP_PATHCONF(vp, name, retval, ctx);
1506 error = VNOP_PATHCONF(vp, name, retval, ctx);
1514 vn_kqfilt_add(struct fileproc *fp, struct knote *kn, vfs_context_t ctx)
1557 error = mac_vnode_check_kqfilter(ctx, fp->f_fglob->fg_cred, kn, vp);
1573 VNOP_MONITOR(vp, 0, VNODE_MONITOR_BEGIN, (void*) kn, ctx);
1584 vfs_context_t ctx = vfs_context_current();
1599 VNOP_MONITOR(vp, 0, VNODE_MONITOR_END, (void*)kn, ctx);