FreeBSD kernel kern code
vfs_syscalls.c File Reference
#include <sys/cdefs.h>
#include "opt_capsicum.h"
#include "opt_compat.h"
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/capability.h>
#include <sys/disk.h>
#include <sys/sysent.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/sysproto.h>
#include <sys/namei.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filio.h>
#include <sys/limits.h>
#include <sys/linker.h>
#include <sys/sdt.h>
#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/dirent.h>
#include <sys/jail.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <machine/stdarg.h>
#include <security/audit/audit.h>
#include <security/mac/mac_framework.h>
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/uma.h>
#include <ufs/ufs/quota.h>
Include dependency graph for vfs_syscalls.c:

Go to the source code of this file.

Data Structures

struct  sync_args
 
struct  quotactl_args
 
struct  statfs_args
 
struct  fstatfs_args
 
struct  getfsstat_args
 
struct  fchdir_args
 
struct  chdir_args
 
struct  chroot_args
 
struct  open_args
 
struct  openat_args
 
struct  mknod_args
 
struct  mknodat_args
 
struct  mkfifo_args
 
struct  mkfifoat_args
 
struct  link_args
 
struct  linkat_args
 
struct  symlink_args
 
struct  symlinkat_args
 
struct  unlink_args
 
struct  unlinkat_args
 
struct  lseek_args
 
struct  access_args
 
struct  faccessat_args
 
struct  eaccess_args
 
struct  stat_args
 
struct  fstatat_args
 
struct  lstat_args
 
struct  nstat_args
 
struct  lstat_args
 
struct  pathconf_args
 
struct  lpathconf_args
 
struct  readlink_args
 
struct  readlinkat_args
 
struct  chflags_args
 
struct  fchflags_args
 
struct  chmod_args
 
struct  fchmodat_args
 
struct  lchmod_args
 
struct  fchmod_args
 
struct  chown_args
 
struct  fchownat_args
 
struct  lchown_args
 
struct  fchown_args
 
struct  utimes_args
 
struct  futimesat_args
 
struct  lutimes_args
 
struct  futimes_args
 
struct  truncate_args
 
struct  fsync_args
 
struct  rename_args
 
struct  renameat_args
 
struct  mkdir_args
 
struct  mkdirat_args
 
struct  rmdir_args
 
struct  getdirentries_args
 
struct  getdents_args
 
struct  umask_args
 
struct  revoke_args
 
struct  lgetfh_args
 
struct  getfh_args
 
struct  fhopen_args
 
struct  fhstat_args
 
struct  fhstatfs_args
 

Functions

 __FBSDID ("$BSDSUniX$")
 
 MALLOC_DEFINE (M_FADVISE,"fadvise","posix_fadvise(2) information")
 
 SDT_PROVIDER_DEFINE (vfs)
 
 SDT_PROBE_DEFINE2 (vfs,, stat, mode,"char *","int")
 
 SDT_PROBE_DEFINE2 (vfs,, stat, reg,"char *","int")
 
static int chroot_refuse_vdir_fds (struct filedesc *fdp)
 
static int getutimes (const struct timeval *, enum uio_seg, struct timespec *)
 
static int setfflags (struct thread *td, struct vnode *, int)
 
static int setutimes (struct thread *td, struct vnode *, const struct timespec *, int, int)
 
static int vn_access (struct vnode *vp, int user_flags, struct ucred *cred, struct thread *td)
 
int sys_sync (struct thread *td, struct sync_args *uap)
 
int sys_quotactl (struct thread *td, struct quotactl_args *uap)
 
void statfs_scale_blocks (struct statfs *sf, long max_size)
 
int sys_statfs (struct thread *td, struct statfs_args *uap)
 
int kern_statfs (struct thread *td, char *path, enum uio_seg pathseg, struct statfs *buf)
 
int sys_fstatfs (struct thread *td, struct fstatfs_args *uap)
 
int kern_fstatfs (struct thread *td, int fd, struct statfs *buf)
 
int sys_getfsstat (struct thread *td, struct getfsstat_args *uap)
 
int kern_getfsstat (struct thread *td, struct statfs **buf, size_t bufsize, enum uio_seg bufseg, int flags)
 
int sys_fchdir (struct thread *td, struct fchdir_args *uap)
 
int sys_chdir (struct thread *td, struct chdir_args *uap)
 
int kern_chdir (struct thread *td, char *path, enum uio_seg pathseg)
 
 SYSCTL_INT (_kern, OID_AUTO, chroot_allow_open_directories, CTLFLAG_RW,&chroot_allow_open_directories, 0,"")
 
int sys_chroot (struct thread *td, struct chroot_args *uap)
 
int change_dir (struct vnode *vp, struct thread *td)
 
int change_root (struct vnode *vp, struct thread *td)
 
static __inline cap_rights_t flags_to_rights (int flags)
 
int sys_open (struct thread *td, struct open_args *uap)
 
int sys_openat (struct thread *td, struct openat_args *uap)
 
int kern_open (struct thread *td, char *path, enum uio_seg pathseg, int flags, int mode)
 
int kern_openat (struct thread *td, int fd, char *path, enum uio_seg pathseg, int flags, int mode)
 
int sys_mknod (struct thread *td, struct mknod_args *uap)
 
int sys_mknodat (struct thread *td, struct mknodat_args *uap)
 
int kern_mknod (struct thread *td, char *path, enum uio_seg pathseg, int mode, int dev)
 
int kern_mknodat (struct thread *td, int fd, char *path, enum uio_seg pathseg, int mode, int dev)
 
int sys_mkfifo (struct thread *td, struct mkfifo_args *uap)
 
int sys_mkfifoat (struct thread *td, struct mkfifoat_args *uap)
 
int kern_mkfifo (struct thread *td, char *path, enum uio_seg pathseg, int mode)
 
int kern_mkfifoat (struct thread *td, int fd, char *path, enum uio_seg pathseg, int mode)
 
int sys_link (struct thread *td, struct link_args *uap)
 
int sys_linkat (struct thread *td, struct linkat_args *uap)
 
 SYSCTL_INT (_security_bsd, OID_AUTO, hardlink_check_uid, CTLFLAG_RW,&hardlink_check_uid, 0,"Unprivileged processes cannot create hard links to files owned by other ""users")
 
 SYSCTL_INT (_security_bsd, OID_AUTO, hardlink_check_gid, CTLFLAG_RW,&hardlink_check_gid, 0,"Unprivileged processes cannot create hard links to files owned by other ""groups")
 
static int can_hardlink (struct vnode *vp, struct ucred *cred)
 
int kern_link (struct thread *td, char *path, char *link, enum uio_seg segflg)
 
int kern_linkat (struct thread *td, int fd1, int fd2, char *path1, char *path2, enum uio_seg segflg, int follow)
 
int sys_symlink (struct thread *td, struct symlink_args *uap)
 
int sys_symlinkat (struct thread *td, struct symlinkat_args *uap)
 
int kern_symlink (struct thread *td, char *path, char *link, enum uio_seg segflg)
 
int kern_symlinkat (struct thread *td, char *path1, int fd, char *path2, enum uio_seg segflg)
 
int sys_undelete (struct thread *td, struct undelete_args *uap)
 
int sys_unlink (struct thread *td, struct unlink_args *uap)
 
int sys_unlinkat (struct thread *td, struct unlinkat_args *uap)
 
int kern_unlink (struct thread *td, char *path, enum uio_seg pathseg)
 
int kern_unlinkat (struct thread *td, int fd, char *path, enum uio_seg pathseg, ino_t oldinum)
 
int sys_lseek (struct thread *td, struct lseek_args *uap)
 
int freebsd6_lseek (struct thread *td, struct freebsd6_lseek_args *uap)
 
int sys_access (struct thread *td, struct access_args *uap)
 
struct faccessat_args sys_faccessat (struct thread *td, struct faccessat_args *uap)
 
int kern_access (struct thread *td, char *path, enum uio_seg pathseg, int mode)
 
int kern_accessat (struct thread *td, int fd, char *path, enum uio_seg pathseg, int flags, int mode)
 
int sys_eaccess (struct thread *td, struct eaccess_args *uap)
 
int kern_eaccess (struct thread *td, char *path, enum uio_seg pathseg, int flags)
 
int sys_stat (struct thread *td, struct stat_args *uap)
 
struct fstatat_args sys_fstatat (struct thread *td, struct fstatat_args *uap)
 
int kern_stat (struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp)
 
int kern_statat (struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp)
 
int kern_statat_vnhook (struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp, void(*hook)(struct vnode *vp, struct stat *sbp))
 
int sys_lstat (struct thread *td, struct lstat_args *uap)
 
int kern_lstat (struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp)
 
void cvtnstat (struct stat *sb, struct nstat *nsb)
 
int sys_nstat (struct thread *td, struct nstat_args *uap)
 
int sys_nlstat (struct thread *td, struct nlstat_args *uap)
 
int sys_pathconf (struct thread *td, struct pathconf_args *uap)
 
int sys_lpathconf (struct thread *td, struct lpathconf_args *uap)
 
int kern_pathconf (struct thread *td, char *path, enum uio_seg pathseg, int name, u_long flags)
 
int sys_readlink (struct thread *td, struct readlink_args *uap)
 
int sys_readlinkat (struct thread *td, struct readlinkat_args *uap)
 
int kern_readlink (struct thread *td, char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count)
 
int kern_readlinkat (struct thread *td, int fd, char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count)
 
int sys_chflags (struct thread *td, struct chflags_args *uap)
 
int sys_lchflags (struct thread *td, struct lchflags_args *uap)
 
int sys_fchflags (struct thread *td, struct fchflags_args *uap)
 
int setfmode (struct thread *td, struct ucred *cred, struct vnode *vp, int mode)
 
int sys_chmod (struct thread *td, struct chmod_args *uap)
 
struct fchmodat_args sys_fchmodat (struct thread *td, struct fchmodat_args *uap)
 
int kern_chmod (struct thread *td, char *path, enum uio_seg pathseg, int mode)
 
int sys_lchmod (struct thread *td, struct lchmod_args *uap)
 
int kern_fchmodat (struct thread *td, int fd, char *path, enum uio_seg pathseg, mode_t mode, int flag)
 
int sys_fchmod (struct thread *td, struct fchmod_args *uap)
 
int setfown (struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid, gid_t gid)
 
int sys_chown (struct thread *td, struct chown_args *uap)
 
int sys_fchownat (struct thread *td, struct fchownat_args *uap)
 
int kern_chown (struct thread *td, char *path, enum uio_seg pathseg, int uid, int gid)
 
int kern_fchownat (struct thread *td, int fd, char *path, enum uio_seg pathseg, int uid, int gid, int flag)
 
int sys_lchown (struct thread *td, struct lchown_args *uap)
 
int kern_lchown (struct thread *td, char *path, enum uio_seg pathseg, int uid, int gid)
 
int sys_fchown (struct thread *td, struct fchown_args *uap)
 
static int getutimes (struct timeval *usrtvp, enum uio_seg tvpseg, struct timespec *tsp) const
 
int sys_utimes (struct thread *td, struct utimes_args *uap)
 
int sys_futimesat (struct thread *td, struct futimesat_args *uap)
 
int kern_utimes (struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg)
 
int kern_utimesat (struct thread *td, int fd, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg)
 
int sys_lutimes (struct thread *td, struct lutimes_args *uap)
 
int kern_lutimes (struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg)
 
int sys_futimes (struct thread *td, struct futimes_args *uap)
 
int kern_futimes (struct thread *td, int fd, struct timeval *tptr, enum uio_seg tptrseg)
 
int sys_truncate (struct thread *td, struct truncate_args *uap)
 
int kern_truncate (struct thread *td, char *path, enum uio_seg pathseg, off_t length)
 
int freebsd6_truncate (struct thread *td, struct freebsd6_truncate_args *uap)
 
int freebsd6_ftruncate (struct thread *td, struct freebsd6_ftruncate_args *uap)
 
int sys_fsync (struct thread *td, struct fsync_args *uap)
 
int sys_rename (struct thread *td, struct rename_args *uap)
 
int sys_renameat (struct thread *td, struct renameat_args *uap)
 
int kern_rename (struct thread *td, char *from, char *to, enum uio_seg pathseg)
 
int kern_renameat (struct thread *td, int oldfd, char *old, int newfd, char *new, enum uio_seg pathseg)
 
int sys_mkdir (struct thread *td, struct mkdir_args *uap)
 
int sys_mkdirat (struct thread *td, struct mkdirat_args *uap)
 
int kern_mkdir (struct thread *td, char *path, enum uio_seg segflg, int mode)
 
int kern_mkdirat (struct thread *td, int fd, char *path, enum uio_seg segflg, int mode)
 
int sys_rmdir (struct thread *td, struct rmdir_args *uap)
 
int kern_rmdir (struct thread *td, char *path, enum uio_seg pathseg)
 
int kern_rmdirat (struct thread *td, int fd, char *path, enum uio_seg pathseg)
 
int sys_getdirentries (struct thread *td, struct getdirentries_args *uap)
 
int kern_getdirentries (struct thread *td, int fd, char *buf, u_int count, long *basep)
 
int sys_getdents (struct thread *td, struct getdents_args *uap)
 
int sys_umask (struct thread *td, struct umask_args *uap)
 
int sys_revoke (struct thread *td, struct revoke_args *uap)
 
int getvnode (struct filedesc *fdp, int fd, cap_rights_t rights, struct file **fpp)
 
int sys_lgetfh (struct thread *td, struct lgetfh_args *uap)
 
int sys_getfh (struct thread *td, struct getfh_args *uap)
 
int sys_fhopen (struct thread *td, struct fhopen_args *uap)
 
int sys_fhstat (struct thread *td, struct fhstat_args *uap)
 
int sys_fhstatfs (struct thread *td, struct fhstatfs_args *uap)
 
int kern_fhstatfs (struct thread *td, fhandle_t fh, struct statfs *buf)
 
int kern_posix_fallocate (struct thread *td, int fd, off_t offset, off_t len)
 
int sys_posix_fallocate (struct thread *td, struct posix_fallocate_args *uap)
 
int kern_posix_fadvise (struct thread *td, int fd, off_t offset, off_t len, int advice)
 
int sys_posix_fadvise (struct thread *td, struct posix_fadvise_args *uap)
 

Variables

int async_io_version
 
static int chroot_allow_open_directories = 1
 
int hardlink_check_uid = 0
 
static int hardlink_check_gid = 0
 
int dirfd
 
char * path
 
int mode
 
int flag
 
struct eaccess_args sys_faccessat
 
int fd
 
struct stat * buf
 
struct lstat_args sys_fstatat
 
struct lchmod_args sys_fchmodat
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static int can_hardlink ( struct vnode *  vp,
struct ucred *  cred 
)
static

Definition at line 1584 of file vfs_syscalls.c.

References groupmember(), and priv_check_cred().

Referenced by kern_linkat().

Here is the call graph for this function:

Here is the caller graph for this function:

int change_dir ( struct vnode *  vp,
struct thread *  td 
)

Definition at line 941 of file vfs_syscalls.c.

Referenced by do_jail_attach(), kern_chdir(), sys_chroot(), and sys_fchdir().

Here is the caller graph for this function:

int change_root ( struct vnode *  vp,
struct thread *  td 
)

Definition at line 965 of file vfs_syscalls.c.

References chroot_refuse_vdir_fds(), rootvnode, and vrele().

Referenced by do_jail_attach(), and sys_chroot().

Here is the call graph for this function:

Here is the caller graph for this function:

static int chroot_refuse_vdir_fds ( struct filedesc *  fdp)
static

Definition at line 853 of file vfs_syscalls.c.

References fd.

Referenced by change_root().

Here is the caller graph for this function:

void cvtnstat ( struct stat *  sb,
struct nstat *  nsb 
)

Definition at line 2490 of file vfs_syscalls.c.

Referenced by sys_nfstat(), sys_nlstat(), and sys_nstat().

Here is the caller graph for this function:

static __inline cap_rights_t flags_to_rights ( int  flags)
static

Definition at line 1000 of file vfs_syscalls.c.

Referenced by kern_openat().

Here is the caller graph for this function:

int freebsd6_ftruncate ( struct thread *  td,
struct freebsd6_ftruncate_args *  uap 
)

Definition at line 3542 of file vfs_syscalls.c.

References ftruncate_args::fd, ftruncate_args::length, and sys_ftruncate().

Here is the call graph for this function:

int freebsd6_lseek ( struct thread *  td,
struct freebsd6_lseek_args *  uap 
)

Definition at line 2099 of file vfs_syscalls.c.

References lseek_args::fd, lseek_args::offset, sys_lseek(), and lseek_args::whence.

Here is the call graph for this function:

int freebsd6_truncate ( struct thread *  td,
struct freebsd6_truncate_args *  uap 
)

Definition at line 3532 of file vfs_syscalls.c.

References truncate_args::length, truncate_args::path, and sys_truncate().

Here is the call graph for this function:

static int getutimes ( const struct timeval *  ,
enum  uio_seg,
struct timespec *   
)
static

Referenced by kern_futimes(), kern_lutimes(), and kern_utimesat().

Here is the caller graph for this function:

static int getutimes ( struct timeval *  usrtvp,
enum uio_seg  tvpseg,
struct timespec *  tsp 
) const
static

Definition at line 3199 of file vfs_syscalls.c.

References vfs_timestamp().

Here is the call graph for this function:

int getvnode ( struct filedesc *  fdp,
int  fd,
cap_rights_t  rights,
struct file **  fpp 
)
int kern_access ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  mode 
)

Definition at line 2185 of file vfs_syscalls.c.

References kern_accessat().

Here is the call graph for this function:

int kern_accessat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
int  flags,
int  mode 
)

Definition at line 2192 of file vfs_syscalls.c.

References crdup(), crfree(), namei(), NDFREE(), vn_access(), and vput().

Referenced by kern_access(), kern_eaccess(), and sys_faccessat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_chdir ( struct thread *  td,
char *  path,
enum uio_seg  pathseg 
)

Definition at line 816 of file vfs_syscalls.c.

References change_dir(), namei(), NDFREE(), vput(), and vrele().

Referenced by sys_chdir().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_chmod ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  mode 
)

Definition at line 2946 of file vfs_syscalls.c.

References kern_fchmodat().

Referenced by sys_chmod().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_chown ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  uid,
int  gid 
)

Definition at line 3102 of file vfs_syscalls.c.

References kern_fchownat().

Referenced by sys_chown().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_eaccess ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  flags 
)

Definition at line 2255 of file vfs_syscalls.c.

References kern_accessat().

Referenced by sys_eaccess().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_fchmodat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
mode_t  mode,
int  flag 
)

Definition at line 2976 of file vfs_syscalls.c.

References namei(), NDFREE(), setfmode(), and vrele().

Referenced by kern_chmod(), sys_fchmodat(), and sys_lchmod().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_fchownat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
int  uid,
int  gid,
int  flag 
)

Definition at line 3110 of file vfs_syscalls.c.

References namei(), NDFREE(), setfown(), and vrele().

Referenced by kern_chown(), kern_lchown(), and sys_fchownat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_fhstatfs ( struct thread *  td,
fhandle_t  fh,
struct statfs *  buf 
)

Definition at line 4746 of file vfs_syscalls.c.

References prison_canseemount(), priv_check(), vfs_busyfs(), vfs_unbusy(), and vput().

Referenced by sys_fhstatfs().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_fstatfs ( struct thread *  td,
int  fd,
struct statfs *  buf 
)

Definition at line 371 of file vfs_syscalls.c.

References getvnode(), prison_enforce_statfs(), priv_check(), vfs_busy(), vfs_ref(), vfs_rel(), and vfs_unbusy().

Referenced by sys_fstatfs().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_futimes ( struct thread *  td,
int  fd,
struct timeval *  tptr,
enum uio_seg  tptrseg 
)

Definition at line 3405 of file vfs_syscalls.c.

References getutimes(), getvnode(), and setutimes().

Referenced by sys_futimes().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_getdirentries ( struct thread *  td,
int  fd,
char *  buf,
u_int  count,
long *  basep 
)

Definition at line 4154 of file vfs_syscalls.c.

References buf, count, foffset_lock(), foffset_unlock(), getvnode(), and vput().

Referenced by sys_getdirentries().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_getfsstat ( struct thread *  td,
struct statfs **  buf,
size_t  bufsize,
enum uio_seg  bufseg,
int  flags 
)

Definition at line 464 of file vfs_syscalls.c.

References buf, count, malloc(), mountlist, mountlist_mtx, prison_canseemount(), prison_enforce_statfs(), priv_check(), vfs_busy(), and vfs_unbusy().

Referenced by sys_getfsstat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_lchown ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  uid,
int  gid 
)

Definition at line 3155 of file vfs_syscalls.c.

References kern_fchownat().

Referenced by sys_lchown().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_link ( struct thread *  td,
char *  path,
char *  link,
enum uio_seg  segflg 
)

Definition at line 1612 of file vfs_syscalls.c.

References kern_linkat().

Referenced by sys_link().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_linkat ( struct thread *  td,
int  fd1,
int  fd2,
char *  path1,
char *  path2,
enum uio_seg  segflg,
int  follow 
)

Definition at line 1619 of file vfs_syscalls.c.

References bwillwrite(), can_hardlink(), namei(), NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_link(), and sys_linkat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_lstat ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
struct stat *  sbp 
)

Definition at line 2479 of file vfs_syscalls.c.

References kern_statat().

Referenced by sys_lstat(), and sys_nlstat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_lutimes ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
struct timeval *  tptr,
enum uio_seg  tptrseg 
)

Definition at line 3362 of file vfs_syscalls.c.

References getutimes(), namei(), NDFREE(), setutimes(), and vrele().

Referenced by sys_lutimes().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_mkdir ( struct thread *  td,
char *  path,
enum uio_seg  segflg,
int  mode 
)

Definition at line 3796 of file vfs_syscalls.c.

References kern_mkdirat().

Referenced by sys_mkdir().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_mkdirat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  segflg,
int  mode 
)

Definition at line 3803 of file vfs_syscalls.c.

References bwillwrite(), namei(), NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_mkdir(), and sys_mkdirat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_mkfifo ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  mode 
)

Definition at line 1465 of file vfs_syscalls.c.

References kern_mkfifoat().

Referenced by sys_mkfifo().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_mkfifoat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
int  mode 
)

Definition at line 1472 of file vfs_syscalls.c.

References bwillwrite(), namei(), NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_mkfifo(), kern_mknodat(), and sys_mkfifoat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_mknod ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  mode,
int  dev 
)

Definition at line 1314 of file vfs_syscalls.c.

References kern_mknodat().

Referenced by sys_mknod().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_mknodat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
int  mode,
int  dev 
)

Definition at line 1322 of file vfs_syscalls.c.

References bwillwrite(), kern_mkfifoat(), namei(), NDFREE(), panic(), priv_check(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_mknod(), and sys_mknodat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_open ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  flags,
int  mode 
)

Definition at line 1075 of file vfs_syscalls.c.

References kern_openat().

Referenced by fdcheckstd(), parse_dir_md(), and sys_open().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_openat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
int  flags,
int  mode 
)

Definition at line 1083 of file vfs_syscalls.c.

References badfileops, dupfdopen(), falloc_noinstall(), fdclose(), finit(), finstall(), flags_to_rights(), NDFREE(), type, vn_open(), and vnops.

Referenced by kern_open(), and sys_openat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_pathconf ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
int  name,
u_long  flags 
)

Definition at line 2608 of file vfs_syscalls.c.

References async_io_version, namei(), NDFREE(), and vput().

Referenced by sys_lpathconf(), and sys_pathconf().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_posix_fadvise ( struct thread *  td,
int  fd,
off_t  offset,
off_t  len,
int  advice 
)

Definition at line 4895 of file vfs_syscalls.c.

References fget(), free(), malloc(), and mtxpool_sleep.

Referenced by sys_posix_fadvise().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_posix_fallocate ( struct thread *  td,
int  fd,
off_t  offset,
off_t  len 
)

Definition at line 4792 of file vfs_syscalls.c.

References bwillwrite(), fget(), maybe_yield(), panic(), vn_finished_write(), and vn_start_write().

Referenced by sys_posix_fallocate().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_readlink ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
char *  buf,
enum uio_seg  bufseg,
size_t  count 
)

Definition at line 2671 of file vfs_syscalls.c.

References kern_readlinkat().

Referenced by sys_readlink().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_readlinkat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
char *  buf,
enum uio_seg  bufseg,
size_t  count 
)

Definition at line 2680 of file vfs_syscalls.c.

References buf, count, namei(), NDFREE(), and vput().

Referenced by kern_readlink(), and sys_readlinkat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_rename ( struct thread *  td,
char *  from,
char *  to,
enum uio_seg  pathseg 
)

Definition at line 3642 of file vfs_syscalls.c.

References kern_renameat().

Referenced by sys_rename().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_renameat ( struct thread *  td,
int  oldfd,
char *  old,
int  newfd,
char *  new,
enum uio_seg  pathseg 
)

Definition at line 3649 of file vfs_syscalls.c.

References bwillwrite(), namei(), NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_rename(), and sys_renameat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_rmdir ( struct thread *  td,
char *  path,
enum uio_seg  pathseg 
)

Definition at line 3888 of file vfs_syscalls.c.

References kern_rmdirat().

Referenced by sys_rmdir().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_rmdirat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg 
)

Definition at line 3895 of file vfs_syscalls.c.

References bwillwrite(), namei(), NDFREE(), vfs_notify_upper(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_rmdir(), and sys_unlinkat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_stat ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
struct stat *  sbp 
)

Definition at line 2398 of file vfs_syscalls.c.

References kern_statat().

Referenced by parse_dir_md(), and sys_nstat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_statat ( struct thread *  td,
int  flag,
int  fd,
char *  path,
enum uio_seg  pathseg,
struct stat *  sbp 
)

Definition at line 2405 of file vfs_syscalls.c.

References kern_statat_vnhook().

Referenced by kern_lstat(), kern_stat(), and sys_fstatat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_statat_vnhook ( struct thread *  td,
int  flag,
int  fd,
char *  path,
enum uio_seg  pathseg,
struct stat *  sbp,
void(*)(struct vnode *vp, struct stat *sbp)  hook 
)

Definition at line 2413 of file vfs_syscalls.c.

References mode, namei(), NDFREE(), vn_stat(), and vput().

Referenced by kern_statat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_statfs ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
struct statfs *  buf 
)

Definition at line 291 of file vfs_syscalls.c.

References namei(), NDFREE(), prison_enforce_statfs(), priv_check(), vfs_busy(), vfs_ref(), vfs_rel(), vfs_unbusy(), and vput().

Referenced by sys_statfs().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_symlink ( struct thread *  td,
char *  path,
char *  link,
enum uio_seg  segflg 
)

Definition at line 1718 of file vfs_syscalls.c.

References kern_symlinkat().

Referenced by sys_symlink(), and vfs_mountroot_devfs().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_symlinkat ( struct thread *  td,
char *  path1,
int  fd,
char *  path2,
enum uio_seg  segflg 
)

Definition at line 1725 of file vfs_syscalls.c.

References bwillwrite(), namei(), namei_zone, NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Referenced by kern_symlink(), and sys_symlinkat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_truncate ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
off_t  length 
)

Definition at line 3455 of file vfs_syscalls.c.

References namei(), NDFREE(), vn_finished_write(), vn_start_write(), vn_writechk(), and vrele().

Referenced by sys_truncate().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_unlink ( struct thread *  td,
char *  path,
enum uio_seg  pathseg 
)

Definition at line 1888 of file vfs_syscalls.c.

References kern_unlinkat().

Referenced by sys_unlink(), and vfs_mountroot_shuffle().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_unlinkat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
ino_t  oldinum 
)

Definition at line 1895 of file vfs_syscalls.c.

References bwillwrite(), namei(), NDFREE(), vfs_notify_upper(), vn_finished_write(), vn_start_write(), vn_stat(), vput(), and vrele().

Referenced by kern_unlink(), and sys_unlinkat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_utimes ( struct thread *  td,
char *  path,
enum uio_seg  pathseg,
struct timeval *  tptr,
enum uio_seg  tptrseg 
)

Definition at line 3309 of file vfs_syscalls.c.

References kern_utimesat().

Referenced by sys_utimes().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_utimesat ( struct thread *  td,
int  fd,
char *  path,
enum uio_seg  pathseg,
struct timeval *  tptr,
enum uio_seg  tptrseg 
)

Definition at line 3317 of file vfs_syscalls.c.

References getutimes(), namei(), NDFREE(), setutimes(), and vrele().

Referenced by kern_utimes(), and sys_futimesat().

Here is the call graph for this function:

Here is the caller graph for this function:

MALLOC_DEFINE ( M_FADVISE  ,
"fadvise"  ,
"posix_fadvise(2) information"   
)
SDT_PROBE_DEFINE2 ( vfs  ,
stat  ,
mode  ,
"char *"  ,
"int"   
)
SDT_PROBE_DEFINE2 ( vfs  ,
stat  ,
reg  ,
"char *"  ,
"int"   
)
SDT_PROVIDER_DEFINE ( vfs  )
static int setfflags ( struct thread *  td,
struct vnode *  vp,
int  flags 
)
static

Definition at line 2733 of file vfs_syscalls.c.

References priv_check(), vn_finished_write(), and vn_start_write().

Referenced by sys_chflags(), sys_fchflags(), and sys_lchflags().

Here is the call graph for this function:

Here is the caller graph for this function:

int setfmode ( struct thread *  td,
struct ucred *  cred,
struct vnode *  vp,
int  mode 
)

Definition at line 2877 of file vfs_syscalls.c.

References vn_finished_write(), and vn_start_write().

Referenced by kern_fchmodat(), and vn_chmod().

Here is the call graph for this function:

Here is the caller graph for this function:

int setfown ( struct thread *  td,
struct ucred *  cred,
struct vnode *  vp,
uid_t  uid,
gid_t  gid 
)

Definition at line 3028 of file vfs_syscalls.c.

References vn_finished_write(), and vn_start_write().

Referenced by kern_fchownat(), and vn_chown().

Here is the call graph for this function:

Here is the caller graph for this function:

static int setutimes ( struct thread *  td,
struct vnode *  vp,
const struct timespec *  ts,
int  numtimes,
int  nullflag 
)
static

Definition at line 3233 of file vfs_syscalls.c.

References vn_finished_write(), and vn_start_write().

Referenced by kern_futimes(), kern_lutimes(), and kern_utimesat().

Here is the call graph for this function:

Here is the caller graph for this function:

void statfs_scale_blocks ( struct statfs *  sf,
long  max_size 
)

Definition at line 230 of file vfs_syscalls.c.

References count.

int sys_access ( struct thread *  td,
struct access_args uap 
)

Definition at line 2155 of file vfs_syscalls.c.

int sys_chdir ( struct thread *  td,
struct chdir_args uap 
)

Definition at line 805 of file vfs_syscalls.c.

References kern_chdir(), and chdir_args::path.

Here is the call graph for this function:

int sys_chflags ( struct thread *  td,
struct chflags_args uap 
)

Definition at line 2783 of file vfs_syscalls.c.

References namei(), NDFREE(), setfflags(), and vrele().

Here is the call graph for this function:

int sys_chmod ( struct thread *  td,
struct chmod_args uap 
)

Definition at line 2912 of file vfs_syscalls.c.

References kern_chmod().

Here is the call graph for this function:

int sys_chown ( struct thread *  td,
struct chown_args uap 
)

Definition at line 3067 of file vfs_syscalls.c.

References kern_chown().

Here is the call graph for this function:

int sys_chroot ( struct thread *  td,
struct chroot_args uap 
)

Definition at line 897 of file vfs_syscalls.c.

References change_dir(), change_root(), namei(), NDFREE(), chroot_args::path, priv_check(), vput(), and vrele().

Here is the call graph for this function:

int sys_eaccess ( struct thread *  td,
struct eaccess_args uap 
)

Definition at line 2243 of file vfs_syscalls.c.

References kern_eaccess().

Here is the call graph for this function:

struct faccessat_args sys_faccessat ( struct thread *  td,
struct faccessat_args uap 
)

Definition at line 2175 of file vfs_syscalls.c.

References faccessat_args::flag, kern_accessat(), faccessat_args::mode, and faccessat_args::path.

Here is the call graph for this function:

int sys_fchdir ( struct thread *  td,
struct fchdir_args uap 
)

Definition at line 740 of file vfs_syscalls.c.

References change_dir(), fchdir_args::fd, getvnode(), vfs_busy(), vfs_unbusy(), vput(), and vrele().

Here is the call graph for this function:

int sys_fchflags ( struct thread *  td,
struct fchflags_args uap 
)

Definition at line 2845 of file vfs_syscalls.c.

References getvnode(), and setfflags().

Here is the call graph for this function:

int sys_fchmod ( struct thread *  td,
struct fchmod_args uap 
)

Definition at line 3008 of file vfs_syscalls.c.

References fchmod_args::fd, fget(), and fchmod_args::mode.

Here is the call graph for this function:

struct fchmodat_args sys_fchmodat ( struct thread *  td,
struct fchmodat_args uap 
)

Definition at line 2932 of file vfs_syscalls.c.

References fchmodat_args::flag, kern_fchmodat(), mode, fchmodat_args::mode, and fchmodat_args::path.

Here is the call graph for this function:

int sys_fchown ( struct thread *  td,
struct fchown_args uap 
)

Definition at line 3174 of file vfs_syscalls.c.

References fget().

Here is the call graph for this function:

int sys_fchownat ( struct thread *  td,
struct fchownat_args uap 
)

Definition at line 3089 of file vfs_syscalls.c.

References fchownat_args::fd, flag, fchownat_args::flag, fchownat_args::gid, kern_fchownat(), fchownat_args::path, and fchownat_args::uid.

Here is the call graph for this function:

int sys_fhopen ( struct thread *  td,
struct fhopen_args uap 
)
int sys_fhstat ( struct thread *  td,
struct fhstat_args uap 
)

Definition at line 4677 of file vfs_syscalls.c.

References priv_check(), vfs_busyfs(), vfs_unbusy(), vn_stat(), and vput().

Here is the call graph for this function:

int sys_fhstatfs ( struct thread *  td,
struct fhstatfs_args uap 
)

Definition at line 4725 of file vfs_syscalls.c.

References fhstatfs_args::buf, kern_fhstatfs(), and fhstatfs_args::u_fhp.

Here is the call graph for this function:

struct fstatat_args sys_fstatat ( struct thread *  td,
struct fstatat_args uap 
)

Definition at line 2385 of file vfs_syscalls.c.

References fstatat_args::buf, fstatat_args::fd, fstatat_args::flag, kern_statat(), and fstatat_args::path.

Here is the call graph for this function:

int sys_fstatfs ( struct thread *  td,
struct fstatfs_args uap 
)

Definition at line 354 of file vfs_syscalls.c.

References kern_fstatfs().

Here is the call graph for this function:

int sys_fsync ( struct thread *  td,
struct fsync_args uap 
)

Definition at line 3560 of file vfs_syscalls.c.

References fsync_args::fd, getvnode(), vn_finished_write(), and vn_start_write().

Here is the call graph for this function:

int sys_futimes ( struct thread *  td,
struct futimes_args uap 
)

Definition at line 3393 of file vfs_syscalls.c.

References kern_futimes().

Here is the call graph for this function:

int sys_futimesat ( struct thread *  td,
struct futimesat_args uap 
)

Definition at line 3301 of file vfs_syscalls.c.

References futimesat_args::fd, kern_utimesat(), futimesat_args::path, and futimesat_args::times.

Here is the call graph for this function:

int sys_getdents ( struct thread *  td,
struct getdents_args uap 
)

Definition at line 4239 of file vfs_syscalls.c.

References getdirentries_args::basep, getdirentries_args::buf, getdirentries_args::count, getdirentries_args::fd, and sys_getdirentries().

Here is the call graph for this function:

int sys_getdirentries ( struct thread *  td,
struct getdirentries_args uap 
)

Definition at line 4133 of file vfs_syscalls.c.

References kern_getdirentries().

Referenced by sys_getdents().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_getfh ( struct thread *  td,
struct getfh_args uap 
)

Definition at line 4440 of file vfs_syscalls.c.

References namei(), NDFREE(), priv_check(), and vput().

Here is the call graph for this function:

int sys_getfsstat ( struct thread *  td,
struct getfsstat_args uap 
)

Definition at line 445 of file vfs_syscalls.c.

References kern_getfsstat().

Here is the call graph for this function:

int sys_lchflags ( struct thread *  td,
struct lchflags_args *  uap 
)

Definition at line 2811 of file vfs_syscalls.c.

References namei(), NDFREE(), setfflags(), and vrele().

Here is the call graph for this function:

int sys_lchmod ( struct thread *  td,
struct lchmod_args uap 
)

Definition at line 2962 of file vfs_syscalls.c.

References kern_fchmodat().

Here is the call graph for this function:

int sys_lchown ( struct thread *  td,
struct lchown_args uap 
)

Definition at line 3142 of file vfs_syscalls.c.

References kern_lchown().

Here is the call graph for this function:

int sys_lgetfh ( struct thread *  td,
struct lgetfh_args uap 
)

Definition at line 4401 of file vfs_syscalls.c.

References namei(), NDFREE(), priv_check(), and vput().

Here is the call graph for this function:

int sys_link ( struct thread *  td,
struct link_args uap 
)

Definition at line 1539 of file vfs_syscalls.c.

References kern_link().

Here is the call graph for this function:

int sys_linkat ( struct thread *  td,
struct linkat_args uap 
)

Definition at line 1560 of file vfs_syscalls.c.

References linkat_args::fd1, linkat_args::fd2, linkat_args::flag, flag, kern_linkat(), linkat_args::path1, and linkat_args::path2.

Here is the call graph for this function:

int sys_lpathconf ( struct thread *  td,
struct lpathconf_args uap 
)

Definition at line 2596 of file vfs_syscalls.c.

References kern_pathconf().

Here is the call graph for this function:

int sys_lseek ( struct thread *  td,
struct lseek_args uap 
)

Definition at line 1977 of file vfs_syscalls.c.

References fget(), foffset_lock(), and foffset_unlock().

Referenced by freebsd6_lseek().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_lstat ( struct thread *  td,
struct lstat_args uap 
)

Definition at line 2462 of file vfs_syscalls.c.

References kern_lstat().

Here is the call graph for this function:

int sys_lutimes ( struct thread *  td,
struct lutimes_args uap 
)

Definition at line 3349 of file vfs_syscalls.c.

References kern_lutimes().

Here is the call graph for this function:

int sys_mkdir ( struct thread *  td,
struct mkdir_args uap 
)

Definition at line 3770 of file vfs_syscalls.c.

References kern_mkdir().

Here is the call graph for this function:

int sys_mkdirat ( struct thread *  td,
struct mkdirat_args uap 
)

Definition at line 3789 of file vfs_syscalls.c.

References mkdirat_args::fd, kern_mkdirat(), mkdirat_args::mode, and mkdirat_args::path.

Here is the call graph for this function:

int sys_mkfifo ( struct thread *  td,
struct mkfifo_args uap 
)

Definition at line 1438 of file vfs_syscalls.c.

References kern_mkfifo().

Here is the call graph for this function:

int sys_mkfifoat ( struct thread *  td,
struct mkfifoat_args uap 
)

Definition at line 1457 of file vfs_syscalls.c.

References mkfifoat_args::fd, kern_mkfifoat(), mkfifoat_args::mode, and mkfifoat_args::path.

Here is the call graph for this function:

int sys_mknod ( struct thread *  td,
struct mknod_args uap 
)

Definition at line 1285 of file vfs_syscalls.c.

References kern_mknod().

Here is the call graph for this function:

int sys_mknodat ( struct thread *  td,
struct mknodat_args uap 
)

Definition at line 1306 of file vfs_syscalls.c.

References mknodat_args::dev, mknodat_args::fd, kern_mknodat(), mknodat_args::mode, and mknodat_args::path.

Here is the call graph for this function:

int sys_nlstat ( struct thread *  td,
struct nlstat_args *  uap 
)

Definition at line 2549 of file vfs_syscalls.c.

References cvtnstat(), and kern_lstat().

Here is the call graph for this function:

int sys_nstat ( struct thread *  td,
struct nstat_args uap 
)

Definition at line 2520 of file vfs_syscalls.c.

References cvtnstat(), and kern_stat().

Here is the call graph for this function:

int sys_open ( struct thread *  td,
struct open_args uap 
)

Definition at line 1046 of file vfs_syscalls.c.

References kern_open().

Here is the call graph for this function:

int sys_openat ( struct thread *  td,
struct openat_args uap 
)

Definition at line 1067 of file vfs_syscalls.c.

References openat_args::fd, openat_args::flag, kern_openat(), openat_args::mode, and openat_args::path.

Here is the call graph for this function:

int sys_pathconf ( struct thread *  td,
struct pathconf_args uap 
)

Definition at line 2578 of file vfs_syscalls.c.

References kern_pathconf().

Here is the call graph for this function:

int sys_posix_fadvise ( struct thread *  td,
struct posix_fadvise_args *  uap 
)

Definition at line 5020 of file vfs_syscalls.c.

References kern_posix_fadvise().

Here is the call graph for this function:

int sys_posix_fallocate ( struct thread *  td,
struct posix_fallocate_args *  uap 
)

Definition at line 4880 of file vfs_syscalls.c.

References kern_posix_fallocate().

Here is the call graph for this function:

int sys_quotactl ( struct thread *  td,
struct quotactl_args uap 
)

Definition at line 171 of file vfs_syscalls.c.

References namei(), NDFREE(), prison_allow(), vfs_busy(), vfs_ref(), vfs_rel(), vfs_unbusy(), and vput().

Here is the call graph for this function:

int sys_readlink ( struct thread *  td,
struct readlink_args uap 
)

Definition at line 2642 of file vfs_syscalls.c.

References kern_readlink().

Here is the call graph for this function:

int sys_readlinkat ( struct thread *  td,
struct readlinkat_args uap 
)

Definition at line 2663 of file vfs_syscalls.c.

References readlinkat_args::buf, readlinkat_args::bufsize, readlinkat_args::fd, kern_readlinkat(), and readlinkat_args::path.

Here is the call graph for this function:

int sys_rename ( struct thread *  td,
struct rename_args uap 
)

Definition at line 3614 of file vfs_syscalls.c.

References kern_rename().

Here is the call graph for this function:

int sys_renameat ( struct thread *  td,
struct renameat_args uap 
)

Definition at line 3634 of file vfs_syscalls.c.

References kern_renameat(), renameat_args::new, renameat_args::newfd, renameat_args::old, and renameat_args::oldfd.

Here is the call graph for this function:

int sys_revoke ( struct thread *  td,
struct revoke_args uap 
)

Definition at line 4290 of file vfs_syscalls.c.

References namei(), NDFREE(), priv_check(), vcount(), and vput().

Here is the call graph for this function:

int sys_rmdir ( struct thread *  td,
struct rmdir_args uap 
)

Definition at line 3877 of file vfs_syscalls.c.

References kern_rmdir(), and rmdir_args::path.

Here is the call graph for this function:

int sys_stat ( struct thread *  td,
struct stat_args uap 
)

Definition at line 2360 of file vfs_syscalls.c.

int sys_statfs ( struct thread *  td,
struct statfs_args uap 
)

Definition at line 274 of file vfs_syscalls.c.

References kern_statfs().

Here is the call graph for this function:

int sys_symlink ( struct thread *  td,
struct symlink_args uap 
)

Definition at line 1691 of file vfs_syscalls.c.

References kern_symlink().

Here is the call graph for this function:

int sys_symlinkat ( struct thread *  td,
struct symlinkat_args uap 
)

Definition at line 1710 of file vfs_syscalls.c.

References symlinkat_args::fd, kern_symlinkat(), and symlinkat_args::path2.

Here is the call graph for this function:

int sys_sync ( struct thread *  td,
struct sync_args uap 
)

Definition at line 128 of file vfs_syscalls.c.

References mountlist, mountlist_mtx, vfs_busy(), vfs_msync(), vfs_unbusy(), vn_finished_write(), and vn_start_write().

Referenced by kern_reboot().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_truncate ( struct thread *  td,
struct truncate_args uap 
)

Definition at line 3442 of file vfs_syscalls.c.

References kern_truncate().

Referenced by freebsd6_truncate().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_umask ( struct thread *  td,
struct umask_args uap 
)

Definition at line 4264 of file vfs_syscalls.c.

References umask_args::newmask.

int sys_undelete ( struct thread *  td,
struct undelete_args *  uap 
)

Definition at line 1798 of file vfs_syscalls.c.

References bwillwrite(), namei(), NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().

Here is the call graph for this function:

int sys_unlink ( struct thread *  td,
struct unlink_args uap 
)

Definition at line 1854 of file vfs_syscalls.c.

References kern_unlink(), and unlink_args::path.

Here is the call graph for this function:

int sys_unlinkat ( struct thread *  td,
struct unlinkat_args uap 
)

Definition at line 1872 of file vfs_syscalls.c.

References unlinkat_args::fd, fd, unlinkat_args::flag, flag, kern_rmdirat(), kern_unlinkat(), unlinkat_args::path, and path.

Here is the call graph for this function:

int sys_utimes ( struct thread *  td,
struct utimes_args uap 
)

Definition at line 3281 of file vfs_syscalls.c.

References kern_utimes().

Here is the call graph for this function:

SYSCTL_INT ( _kern  ,
OID_AUTO  ,
chroot_allow_open_directories  ,
CTLFLAG_RW  ,
chroot_allow_open_directories,
,
""   
)
SYSCTL_INT ( _security_bsd  ,
OID_AUTO  ,
hardlink_check_uid  ,
CTLFLAG_RW  ,
hardlink_check_uid,
,
"Unprivileged processes cannot create hard links to files owned by other ""users"   
)
SYSCTL_INT ( _security_bsd  ,
OID_AUTO  ,
hardlink_check_gid  ,
CTLFLAG_RW  ,
hardlink_check_gid,
,
"Unprivileged processes cannot create hard links to files owned by other ""groups"   
)
static int vn_access ( struct vnode *  vp,
int  user_flags,
struct ucred *  cred,
struct thread *  td 
)
static

Definition at line 2115 of file vfs_syscalls.c.

References accmode, and vn_writechk().

Referenced by kern_accessat().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int async_io_version

Definition at line 111 of file vfs_syscalls.c.

Referenced by aio_onceonly(), aio_unload(), kern_pathconf(), and sys_fpathconf().

struct stat* buf

Definition at line 2363 of file vfs_syscalls.c.

Referenced by kern_getdirentries(), kern_getfsstat(), and kern_readlinkat().

int chroot_allow_open_directories = 1
static

Definition at line 883 of file vfs_syscalls.c.

int dirfd

Definition at line 2156 of file vfs_syscalls.c.

int fd

Definition at line 2361 of file vfs_syscalls.c.

Referenced by chroot_refuse_vdir_fds(), and sys_unlinkat().

int hardlink_check_gid = 0
static

Definition at line 1577 of file vfs_syscalls.c.

int hardlink_check_uid = 0

Definition at line 1572 of file vfs_syscalls.c.

struct eaccess_args sys_faccessat
struct lchmod_args sys_fchmodat
struct lstat_args sys_fstatat