MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys_fchflags

Function sys_fchflags

freebsd/kern/vfs_syscalls.c:2767–2787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2765};
2766#endif
2767int
2768sys_fchflags(struct thread *td, struct fchflags_args *uap)
2769{
2770 struct file *fp;
2771 int error;
2772
2773 AUDIT_ARG_FD(uap->fd);
2774 AUDIT_ARG_FFLAGS(uap->flags);
2775 error = getvnode(td, uap->fd, &cap_fchflags_rights,
2776 &fp);
2777 if (error != 0)
2778 return (error);
2779#ifdef AUDIT
2780 vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
2781 AUDIT_ARG_VNODE1(fp->f_vnode);
2782 VOP_UNLOCK(fp->f_vnode);
2783#endif
2784 error = setfflags(td, fp->f_vnode, uap->flags);
2785 fdrop(fp, td);
2786 return (error);
2787}
2788
2789/*
2790 * Common implementation code for chmod(), lchmod() and fchmod().

Callers

nothing calls this directly

Calls 3

getvnodeFunction · 0.85
vn_lockFunction · 0.85
setfflagsFunction · 0.85

Tested by

no test coverage detected