FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_capsicum.h"
#include "opt_ktrace.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/capsicum.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/rwlock.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 <fs/devfs/devfs.h>
Go to the source code of this file.
Macros | |
#define | UTIMENS_NULL 0x1 |
#define | UTIMENS_EXIT 0x2 |
Functions | |
__FBSDID ("$FreeBSD$") | |
MALLOC_DEFINE (M_FADVISE, "fadvise", "posix_fadvise(2) information") | |
static int | kern_chflagsat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, u_long flags, int atflag) |
static int | setfflags (struct thread *td, struct vnode *, u_long) |
static int | getutimes (const struct timeval *, enum uio_seg, struct timespec *) |
static int | getutimens (const struct timespec *, enum uio_seg, struct timespec *, 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) |
static int | kern_fhlinkat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, fhandle_t *fhp) |
static int | kern_readlink_vp (struct vnode *vp, char *buf, enum uio_seg bufseg, size_t count, struct thread *td) |
static int | kern_linkat_vp (struct thread *td, struct vnode *vp, int fd, const char *path, enum uio_seg segflag) |
static uint64_t | at2cnpflags (u_int at_flags, u_int mask) |
int | kern_sync (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) |
static int | kern_do_statfs (struct thread *td, struct mount *mp, struct statfs *buf) |
int | sys_statfs (struct thread *td, struct statfs_args *uap) |
int | kern_statfs (struct thread *td, const 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, size_t *countp, enum uio_seg bufseg, int mode) |
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, const char *path, enum uio_seg pathseg) |
SYSCTL_INT (_security_bsd, OID_AUTO, unprivileged_chroot, CTLFLAG_RW, &unprivileged_chroot, 0, "Unprivileged processes can use chroot(2)") | |
int | sys_chroot (struct thread *td, struct chroot_args *uap) |
int | change_dir (struct vnode *vp, struct thread *td) |
static __inline void | flags_to_rights (int flags, cap_rights_t *rightsp) |
int | sys_open (struct thread *td, struct open_args *uap) |
int | sys_openat (struct thread *td, struct openat_args *uap) |
int | kern_openat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode) |
int | sys_mknodat (struct thread *td, struct mknodat_args *uap) |
int | kern_mknodat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode, dev_t dev) |
int | sys_mkfifo (struct thread *td, struct mkfifo_args *uap) |
int | sys_mkfifoat (struct thread *td, struct mkfifoat_args *uap) |
int | kern_mkfifoat (struct thread *td, int fd, const 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_linkat (struct thread *td, int fd1, int fd2, const char *path1, const char *path2, enum uio_seg segflag, int flag) |
int | sys_symlink (struct thread *td, struct symlink_args *uap) |
int | sys_symlinkat (struct thread *td, struct symlinkat_args *uap) |
int | kern_symlinkat (struct thread *td, const char *path1, int fd, const 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) |
static int | kern_funlinkat_ex (struct thread *td, int dfd, const char *path, int fd, int flag, enum uio_seg pathseg, ino_t oldinum) |
int | sys_unlinkat (struct thread *td, struct unlinkat_args *uap) |
int | sys_funlinkat (struct thread *td, struct funlinkat_args *uap) |
int | kern_funlinkat (struct thread *td, int dfd, const char *path, int fd, enum uio_seg pathseg, int flag, ino_t oldinum) |
int | sys_lseek (struct thread *td, struct lseek_args *uap) |
int | kern_lseek (struct thread *td, int fd, off_t offset, int whence) |
int | sys_access (struct thread *td, struct access_args *uap) |
struct faccessat_args | sys_faccessat (struct thread *td, struct faccessat_args *uap) |
int | kern_accessat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag, int amode) |
int | sys_eaccess (struct thread *td, struct eaccess_args *uap) |
struct fstatat_args | sys_fstatat (struct thread *td, struct fstatat_args *uap) |
int | kern_statat (struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp, void(*hook)(struct vnode *vp, struct stat *sbp)) |
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, const char *path, enum uio_seg pathseg, int name, u_long flags, long *valuep) |
int | sys_readlink (struct thread *td, struct readlink_args *uap) |
int | sys_readlinkat (struct thread *td, struct readlinkat_args *uap) |
int | kern_readlinkat (struct thread *td, int fd, const 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) |
struct chflagsat_args | sys_chflagsat (struct thread *td, struct chflagsat_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 | sys_lchmod (struct thread *td, struct lchmod_args *uap) |
int | kern_fchmodat (struct thread *td, int fd, const 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_fchownat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, int uid, int gid, int flag) |
int | sys_lchown (struct thread *td, struct lchown_args *uap) |
int | sys_fchown (struct thread *td, struct fchown_args *uap) |
int | sys_utimes (struct thread *td, struct utimes_args *uap) |
int | sys_futimesat (struct thread *td, struct futimesat_args *uap) |
int | kern_utimesat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, const struct timeval *tptr, enum uio_seg tptrseg) |
int | sys_lutimes (struct thread *td, struct lutimes_args *uap) |
int | kern_lutimes (struct thread *td, const char *path, enum uio_seg pathseg, const 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, const struct timeval *tptr, enum uio_seg tptrseg) |
int | sys_futimens (struct thread *td, struct futimens_args *uap) |
int | kern_futimens (struct thread *td, int fd, const struct timespec *tptr, enum uio_seg tptrseg) |
int | sys_utimensat (struct thread *td, struct utimensat_args *uap) |
int | kern_utimensat (struct thread *td, int fd, const char *path, enum uio_seg pathseg, const struct timespec *tptr, enum uio_seg tptrseg, int flag) |
int | sys_truncate (struct thread *td, struct truncate_args *uap) |
int | kern_truncate (struct thread *td, const char *path, enum uio_seg pathseg, off_t length) |
int | kern_fsync (struct thread *td, int fd, bool fullsync) |
int | sys_fsync (struct thread *td, struct fsync_args *uap) |
int | sys_fdatasync (struct thread *td, struct fdatasync_args *uap) |
int | sys_rename (struct thread *td, struct rename_args *uap) |
int | sys_renameat (struct thread *td, struct renameat_args *uap) |
int | kern_renameat (struct thread *td, int oldfd, const char *old, int newfd, const 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_mkdirat (struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode) |
int | sys_rmdir (struct thread *td, struct rmdir_args *uap) |
int | kern_frmdirat (struct thread *td, int dfd, const char *path, int fd, enum uio_seg pathseg, int flag) |
int | sys_getdirentries (struct thread *td, struct getdirentries_args *uap) |
int | kern_getdirentries (struct thread *td, int fd, char *buf, size_t count, off_t *basep, ssize_t *residp, enum uio_seg bufseg) |
int | sys_umask (struct thread *td, struct umask_args *uap) |
int | sys_revoke (struct thread *td, struct revoke_args *uap) |
int | getvnode_path (struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) |
int | getvnode (struct thread *td, int fd, cap_rights_t *rightsp, 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_getfhat (struct thread *td, struct getfhat_args *uap) |
int | kern_getfhat (struct thread *td, int flags, int fd, const char *path, enum uio_seg pathseg, fhandle_t *fhp, enum uio_seg fhseg) |
int | sys_fhlink (struct thread *td, struct fhlink_args *uap) |
int | sys_fhlinkat (struct thread *td, struct fhlinkat_args *uap) |
int | sys_fhreadlink (struct thread *td, struct fhreadlink_args *uap) |
int | sys_fhopen (struct thread *td, struct fhopen_args *uap) |
int | kern_fhopen (struct thread *td, const struct fhandle *u_fhp, int flags) |
int | sys_fhstat (struct thread *td, struct fhstat_args *uap) |
int | kern_fhstat (struct thread *td, struct fhandle fh, struct stat *sb) |
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_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) |
int | kern_copy_file_range (struct thread *td, int infd, off_t *inoffp, int outfd, off_t *outoffp, size_t len, unsigned int flags) |
int | sys_copy_file_range (struct thread *td, struct copy_file_range_args *uap) |
Variables | |
static int | unprivileged_chroot = 0 |
int | hardlink_check_uid = 0 |
static int | hardlink_check_gid = 0 |
int | dirfd |
char * | path |
int | amode |
int | flag |
struct eaccess_args | sys_faccessat |
int | fd |
struct stat * | buf |
struct pathconf_args | sys_fstatat |
u_long | flags |
int | atflag |
struct lchflags_args | sys_chflagsat |
mode_t | mode |
struct lchmod_args | sys_fchmodat |
#define UTIMENS_EXIT 0x2 |
Definition at line 3147 of file vfs_syscalls.c.
#define UTIMENS_NULL 0x1 |
Definition at line 3146 of file vfs_syscalls.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 115 of file vfs_syscalls.c.
Referenced by kern_accessat(), kern_chflagsat(), kern_fchmodat(), kern_fchownat(), kern_frmdirat(), kern_funlinkat(), kern_getfhat(), kern_linkat(), kern_statat(), and kern_utimensat().
|
static |
Definition at line 1554 of file vfs_syscalls.c.
References groupmember(), hardlink_check_gid, hardlink_check_uid, and priv_check_cred().
Referenced by kern_linkat_vp().
int change_dir | ( | struct vnode * | vp, |
struct thread * | td | ||
) |
Definition at line 1030 of file vfs_syscalls.c.
Referenced by do_jail_attach(), kern_chdir(), sys_chroot(), and sys_fchdir().
|
static |
Definition at line 1048 of file vfs_syscalls.c.
References flags.
Referenced by kern_openat().
|
static |
Definition at line 3149 of file vfs_syscalls.c.
References UTIMENS_EXIT, UTIMENS_NULL, and vfs_timestamp().
Referenced by kern_futimens(), and kern_utimensat().
|
static |
Definition at line 3115 of file vfs_syscalls.c.
References vfs_timestamp().
Referenced by kern_futimes(), kern_lutimes(), and kern_utimesat().
int getvnode | ( | struct thread * | td, |
int | fd, | ||
cap_rights_t * | rightsp, | ||
struct file ** | fpp | ||
) |
Definition at line 4353 of file vfs_syscalls.c.
References fd, getvnode_path(), and path_fileops.
Referenced by kern_frmdirat(), kern_fsync(), kern_futimens(), kern_futimes(), kern_getdirentries(), sys___acl_aclcheck_fd(), sys___acl_delete_fd(), sys___acl_get_fd(), sys___acl_set_fd(), sys_fchflags(), and sysctl_ftry_reclaim_vnode().
int getvnode_path | ( | struct thread * | td, |
int | fd, | ||
cap_rights_t * | rightsp, | ||
struct file ** | fpp | ||
) |
Definition at line 4315 of file vfs_syscalls.c.
References badfileops, fd, and fget_unlocked().
Referenced by getvnode(), kern_fstatfs(), kern_funlinkat(), sys_extattr_delete_fd(), sys_extattr_get_fd(), sys_extattr_list_fd(), sys_extattr_set_fd(), and sys_fchdir().
int kern_accessat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
int | flag, | ||
int | amode | ||
) |
Definition at line 2120 of file vfs_syscalls.c.
References amode, at2cnpflags(), cap_fstat_rights, crdup(), crfree(), fd, flag, namei(), path, vn_access(), and vput().
Referenced by sys_access(), and sys_eaccess().
int kern_chdir | ( | struct thread * | td, |
const char * | path, | ||
enum uio_seg | pathseg | ||
) |
Definition at line 950 of file vfs_syscalls.c.
References change_dir(), namei(), path, pwd_chdir(), and vput().
Referenced by sys_chdir().
|
static |
Definition at line 2801 of file vfs_syscalls.c.
References at2cnpflags(), atflag, cap_fchflags_rights, fd, flags, namei(), path, setfflags(), and vrele().
Referenced by sys_chflags(), and sys_lchflags().
int kern_copy_file_range | ( | struct thread * | td, |
int | infd, | ||
off_t * | inoffp, | ||
int | outfd, | ||
off_t * | outoffp, | ||
size_t | len, | ||
unsigned int | flags | ||
) |
Definition at line 4889 of file vfs_syscalls.c.
References badfileops, cap_read_rights, cap_write_rights, fget_read(), fget_write(), flags, and vn_copy_file_range().
Referenced by sys_copy_file_range().
|
static |
Definition at line 280 of file vfs_syscalls.c.
References buf, prison_enforce_statfs(), priv_check_cred_vfs_generation(), vfs_busy(), vfs_rel(), and vfs_unbusy().
Referenced by kern_fstatfs(), and kern_statfs().
int kern_fchmodat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
mode_t | mode, | ||
int | flag | ||
) |
Definition at line 2932 of file vfs_syscalls.c.
References at2cnpflags(), cap_fchmod_rights, fd, flag, mode, namei(), path, setfmode(), and vrele().
Referenced by sys_chmod(), and sys_lchmod().
int kern_fchownat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
int | uid, | ||
int | gid, | ||
int | flag | ||
) |
Definition at line 3044 of file vfs_syscalls.c.
References at2cnpflags(), cap_fchown_rights, fd, flag, namei(), path, setfown(), and vrele().
Referenced by sys_chown(), sys_fchownat(), and sys_lchown().
|
static |
Definition at line 4491 of file vfs_syscalls.c.
References bwillwrite(), fd, kern_linkat_vp(), path, priv_check(), vfs_busyfs(), and vfs_unbusy().
Referenced by sys_fhlink(), and sys_fhlinkat().
int kern_fhopen | ( | struct thread * | td, |
const struct fhandle * | u_fhp, | ||
int | flags | ||
) |
Definition at line 4573 of file vfs_syscalls.c.
References badfileops, finit_vnode(), finstall(), flags, priv_check(), vfs_busyfs(), vfs_unbusy(), vn_open_vnode(), vnops, and vput().
Referenced by sys_fhopen().
int kern_fhstat | ( | struct thread * | td, |
struct fhandle | fh, | ||
struct stat * | sb | ||
) |
Definition at line 4671 of file vfs_syscalls.c.
References priv_check(), vfs_busyfs(), vfs_unbusy(), and vput().
Referenced by sys_fhstat().
int kern_fhstatfs | ( | struct thread * | td, |
fhandle_t | fh, | ||
struct statfs * | buf | ||
) |
Definition at line 4719 of file vfs_syscalls.c.
References buf, prison_canseemount(), priv_check(), vfs_busyfs(), vfs_unbusy(), and vput().
Referenced by sys_fhstatfs().
int kern_frmdirat | ( | struct thread * | td, |
int | dfd, | ||
const char * | path, | ||
int | fd, | ||
enum uio_seg | pathseg, | ||
int | flag | ||
) |
Definition at line 3885 of file vfs_syscalls.c.
References at2cnpflags(), bwillwrite(), cap_unlinkat_rights, fd, flag, getvnode(), namei(), NDFREE(), path, vfs_notify_upper(), vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by kern_funlinkat_ex(), and sys_rmdir().
int kern_fstatfs | ( | struct thread * | td, |
int | fd, | ||
struct statfs * | buf | ||
) |
Definition at line 372 of file vfs_syscalls.c.
References buf, cap_fstatfs_rights, fd, getvnode_path(), kern_do_statfs(), and vfs_ref_from_vp().
Referenced by sys_fstatfs().
int kern_fsync | ( | struct thread * | td, |
int | fd, | ||
bool | fullsync | ||
) |
Definition at line 3541 of file vfs_syscalls.c.
References cap_fsync_rights, fd, getvnode(), vn_finished_write(), vn_lktype_write(), and vn_start_write().
Referenced by sys_fdatasync(), and sys_fsync().
int kern_funlinkat | ( | struct thread * | td, |
int | dfd, | ||
const char * | path, | ||
int | fd, | ||
enum uio_seg | pathseg, | ||
int | flag, | ||
ino_t | oldinum | ||
) |
Definition at line 1902 of file vfs_syscalls.c.
References at2cnpflags(), bwillwrite(), cap_no_rights, cap_unlinkat_rights, fd, flag, getvnode_path(), namei(), NDFREE(), path, vfs_notify_upper(), vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by kern_funlinkat_ex(), sys_unlink(), and vfs_mountroot_shuffle().
|
static |
Definition at line 1857 of file vfs_syscalls.c.
References fd, flag, kern_frmdirat(), kern_funlinkat(), and path.
Referenced by sys_funlinkat(), and sys_unlinkat().
int kern_futimens | ( | struct thread * | td, |
int | fd, | ||
const struct timespec * | tptr, | ||
enum uio_seg | tptrseg | ||
) |
Definition at line 3371 of file vfs_syscalls.c.
References cap_futimes_rights, fd, flags, getutimens(), getvnode(), setutimes(), ts, UTIMENS_EXIT, and UTIMENS_NULL.
Referenced by sys_futimens().
int kern_futimes | ( | struct thread * | td, |
int | fd, | ||
const struct timeval * | tptr, | ||
enum uio_seg | tptrseg | ||
) |
Definition at line 3337 of file vfs_syscalls.c.
References cap_futimes_rights, fd, getutimes(), getvnode(), setutimes(), and ts.
Referenced by sys_futimes().
int kern_getdirentries | ( | struct thread * | td, |
int | fd, | ||
char * | buf, | ||
size_t | count, | ||
off_t * | basep, | ||
ssize_t * | residp, | ||
enum uio_seg | bufseg | ||
) |
Definition at line 4168 of file vfs_syscalls.c.
References buf, cap_read_rights, count, fd, foffset_lock(), foffset_unlock(), getvnode(), and vput().
Referenced by sys_getdirentries().
int kern_getfhat | ( | struct thread * | td, |
int | flags, | ||
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
fhandle_t * | fhp, | ||
enum uio_seg | fhseg | ||
) |
Definition at line 4429 of file vfs_syscalls.c.
References at2cnpflags(), fd, flags, namei(), path, priv_check(), and vput().
Referenced by sys_getfh(), sys_getfhat(), and sys_lgetfh().
int kern_getfsstat | ( | struct thread * | td, |
struct statfs ** | buf, | ||
size_t | bufsize, | ||
size_t * | countp, | ||
enum uio_seg | bufseg, | ||
int | mode | ||
) |
Definition at line 427 of file vfs_syscalls.c.
References buf, count, free(), malloc(), maxcount, mode, mountlist, mountlist_mtx, prison_canseemount(), prison_enforce_statfs(), priv_check_cred_vfs_generation(), vfs_busy(), and vfs_unbusy().
Referenced by sys_getfsstat().
int kern_linkat | ( | struct thread * | td, |
int | fd1, | ||
int | fd2, | ||
const char * | path1, | ||
const char * | path2, | ||
enum uio_seg | segflag, | ||
int | flag | ||
) |
Definition at line 1582 of file vfs_syscalls.c.
References at2cnpflags(), bwillwrite(), cap_linkat_source_rights, flag, kern_linkat_vp(), namei(), NDFREE(), priv_check(), and vrele().
Referenced by sys_link(), and sys_linkat().
|
static |
Definition at line 1614 of file vfs_syscalls.c.
References can_hardlink(), cap_linkat_target_rights, fd, namei(), NDFREE(), path, vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by kern_fhlinkat(), and kern_linkat().
int kern_lseek | ( | struct thread * | td, |
int | fd, | ||
off_t | offset, | ||
int | whence | ||
) |
Definition at line 2011 of file vfs_syscalls.c.
References cap_seek_rights, fd, and fget().
Referenced by sys_lseek().
int kern_lutimes | ( | struct thread * | td, |
const char * | path, | ||
enum uio_seg | pathseg, | ||
const struct timeval * | tptr, | ||
enum uio_seg | tptrseg | ||
) |
Definition at line 3302 of file vfs_syscalls.c.
References getutimes(), namei(), path, setutimes(), ts, and vrele().
Referenced by sys_lutimes().
int kern_mkdirat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | segflg, | ||
int | mode | ||
) |
Definition at line 3823 of file vfs_syscalls.c.
References bwillwrite(), cap_mkdirat_rights, fd, mode, namei(), NDFREE(), path, vn_finished_write(), vn_start_write(), and vput().
Referenced by sys_mkdir(), and sys_mkdirat().
int kern_mkfifoat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
int | mode | ||
) |
Definition at line 1455 of file vfs_syscalls.c.
References bwillwrite(), cap_mkfifoat_rights, fd, mode, namei(), NDFREE(), path, vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by kern_mknodat(), sys_mkfifo(), and sys_mkfifoat().
int kern_mknodat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
int | mode, | ||
dev_t | dev | ||
) |
Definition at line 1325 of file vfs_syscalls.c.
References bwillwrite(), cap_mknodat_rights, fd, kern_mkfifoat(), mode, namei(), NDFREE(), panic(), path, priv_check(), vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by sys_mknodat().
int kern_openat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
int | flags, | ||
int | mode | ||
) |
Definition at line 1120 of file vfs_syscalls.c.
References badfileops, dupfdopen(), falloc_abort(), fd, filecaps_free(), finit(), finit_vnode(), finstall_refed(), flags, flags_to_rights(), mode, NDFREE(), path, path_fileops, vhold(), vn_open(), vnops, and vunref().
Referenced by fdcheckstd(), parse_dir_md(), sys_open(), and sys_openat().
int kern_pathconf | ( | struct thread * | td, |
const char * | path, | ||
enum uio_seg | pathseg, | ||
int | name, | ||
u_long | flags, | ||
long * | valuep | ||
) |
Definition at line 2600 of file vfs_syscalls.c.
References flags, name, namei(), path, and vput().
Referenced by sys_lpathconf(), and sys_pathconf().
int kern_posix_fadvise | ( | struct thread * | td, |
int | fd, | ||
off_t | offset, | ||
off_t | len, | ||
int | advice | ||
) |
Definition at line 4757 of file vfs_syscalls.c.
References cap_no_rights, fd, fget(), free(), malloc(), and mtxpool_sleep.
Referenced by sys_posix_fadvise().
|
static |
Definition at line 2679 of file vfs_syscalls.c.
Referenced by kern_readlinkat(), and sys_fhreadlink().
int kern_readlinkat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
char * | buf, | ||
enum uio_seg | bufseg, | ||
size_t | count | ||
) |
Definition at line 2651 of file vfs_syscalls.c.
References buf, count, fd, kern_readlink_vp(), namei(), path, and vput().
Referenced by sys_readlink(), and sys_readlinkat().
int kern_renameat | ( | struct thread * | td, |
int | oldfd, | ||
const char * | old, | ||
int | newfd, | ||
const char * | new, | ||
enum uio_seg | pathseg | ||
) |
Definition at line 3662 of file vfs_syscalls.c.
References bwillwrite(), cap_renameat_source_rights, cap_renameat_target_rights, cap_unlinkat_rights, namei(), NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by sys_rename(), and sys_renameat().
int kern_statat | ( | struct thread * | td, |
int | flag, | ||
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
struct stat * | sbp, | ||
void(*)(struct vnode *vp, struct stat *sbp) | hook | ||
) |
Definition at line 2433 of file vfs_syscalls.c.
References at2cnpflags(), cap_fstat_rights, fd, flag, kern_fstat(), namei(), path, and vput().
Referenced by parse_dir_md().
int kern_statfs | ( | struct thread * | td, |
const char * | path, | ||
enum uio_seg | pathseg, | ||
struct statfs * | buf | ||
) |
Definition at line 331 of file vfs_syscalls.c.
References buf, kern_do_statfs(), namei(), path, vfs_ref_from_vp(), and vrele().
Referenced by sys_statfs().
int kern_symlinkat | ( | struct thread * | td, |
const char * | path1, | ||
int | fd, | ||
const char * | path2, | ||
enum uio_seg | segflg | ||
) |
Definition at line 1722 of file vfs_syscalls.c.
References bwillwrite(), cap_symlinkat_rights, fd, namei(), namei_zone, NDFREE(), vn_finished_write(), vn_start_write(), vput(), and vrele().
Referenced by sys_symlink(), sys_symlinkat(), and vfs_mountroot_devfs().
int kern_sync | ( | struct thread * | td | ) |
Definition at line 139 of file vfs_syscalls.c.
References mountlist, mountlist_mtx, vfs_busy(), vfs_periodic(), vfs_unbusy(), vn_finished_write(), and vn_start_write().
Referenced by bufshutdown(), and sys_sync().
int kern_truncate | ( | struct thread * | td, |
const char * | path, | ||
enum uio_seg | pathseg, | ||
off_t | length | ||
) |
Definition at line 3458 of file vfs_syscalls.c.
References namei(), NDFREE(), path, vn_finished_write(), vn_start_write(), vn_writechk(), and vrele().
Referenced by sys_truncate().
int kern_utimensat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
const struct timespec * | tptr, | ||
enum uio_seg | tptrseg, | ||
int | flag | ||
) |
Definition at line 3408 of file vfs_syscalls.c.
References at2cnpflags(), cap_futimes_rights, fd, flag, flags, getutimens(), namei(), path, setutimes(), ts, UTIMENS_EXIT, UTIMENS_NULL, and vrele().
Referenced by sys_utimensat().
int kern_utimesat | ( | struct thread * | td, |
int | fd, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
const struct timeval * | tptr, | ||
enum uio_seg | tptrseg | ||
) |
Definition at line 3264 of file vfs_syscalls.c.
References cap_futimes_rights, fd, getutimes(), namei(), path, setutimes(), ts, and vrele().
Referenced by sys_futimesat(), and sys_utimes().
MALLOC_DEFINE | ( | M_FADVISE | , |
"fadvise" | , | ||
"posix_fadvise(2) information" | |||
) |
|
static |
Definition at line 2713 of file vfs_syscalls.c.
References flags, priv_check(), vn_finished_write(), and vn_start_write().
Referenced by kern_chflagsat(), and sys_fchflags().
int setfmode | ( | struct thread * | td, |
struct ucred * | cred, | ||
struct vnode * | vp, | ||
int | mode | ||
) |
Definition at line 2860 of file vfs_syscalls.c.
References mode, vn_finished_write(), and vn_start_write().
Referenced by kern_fchmodat(), and vn_chmod().
int setfown | ( | struct thread * | td, |
struct ucred * | cred, | ||
struct vnode * | vp, | ||
uid_t | uid, | ||
gid_t | gid | ||
) |
Definition at line 2984 of file vfs_syscalls.c.
References vn_finished_write(), and vn_start_write().
Referenced by kern_fchownat(), and vn_chown().
|
static |
Definition at line 3193 of file vfs_syscalls.c.
References ts, vn_finished_write(), and vn_start_write().
Referenced by kern_futimens(), kern_futimes(), kern_lutimes(), kern_utimensat(), and kern_utimesat().
void statfs_scale_blocks | ( | struct statfs * | sf, |
long | max_size | ||
) |
Definition at line 245 of file vfs_syscalls.c.
References count.
int sys_access | ( | struct thread * | td, |
struct access_args * | uap | ||
) |
Definition at line 2096 of file vfs_syscalls.c.
References access_args::amode, kern_accessat(), and access_args::path.
int sys_chdir | ( | struct thread * | td, |
struct chdir_args * | uap | ||
) |
Definition at line 943 of file vfs_syscalls.c.
References kern_chdir(), and chdir_args::path.
int sys_chflags | ( | struct thread * | td, |
struct chflags_args * | uap | ||
) |
Definition at line 2760 of file vfs_syscalls.c.
References chflags_args::flags, kern_chflagsat(), and chflags_args::path.
struct chflagsat_args sys_chflagsat | ( | struct thread * | td, |
struct chflagsat_args * | uap | ||
) |
Definition at line 2760 of file vfs_syscalls.c.
int sys_chmod | ( | struct thread * | td, |
struct chmod_args * | uap | ||
) |
Definition at line 2891 of file vfs_syscalls.c.
References kern_fchmodat(), chmod_args::mode, and chmod_args::path.
int sys_chown | ( | struct thread * | td, |
struct chown_args * | uap | ||
) |
Definition at line 3019 of file vfs_syscalls.c.
References chown_args::gid, kern_fchownat(), chown_args::path, and chown_args::uid.
int sys_chroot | ( | struct thread * | td, |
struct chroot_args * | uap | ||
) |
Definition at line 983 of file vfs_syscalls.c.
References change_dir(), namei(), chroot_args::path, priv_check(), pwd_chroot(), unprivileged_chroot, vput(), and vrele().
int sys_copy_file_range | ( | struct thread * | td, |
struct copy_file_range_args * | uap | ||
) |
Definition at line 5007 of file vfs_syscalls.c.
References kern_copy_file_range().
int sys_eaccess | ( | struct thread * | td, |
struct eaccess_args * | uap | ||
) |
Definition at line 2176 of file vfs_syscalls.c.
References eaccess_args::amode, kern_accessat(), and eaccess_args::path.
struct faccessat_args sys_faccessat | ( | struct thread * | td, |
struct faccessat_args * | uap | ||
) |
Definition at line 2096 of file vfs_syscalls.c.
int sys_fchdir | ( | struct thread * | td, |
struct fchdir_args * | uap | ||
) |
Definition at line 897 of file vfs_syscalls.c.
References cap_fchdir_rights, change_dir(), fchdir_args::fd, getvnode_path(), pwd_chdir(), vfs_busy(), vfs_unbusy(), vput(), and vref().
int sys_fchflags | ( | struct thread * | td, |
struct fchflags_args * | uap | ||
) |
Definition at line 2833 of file vfs_syscalls.c.
References cap_fchflags_rights, fchflags_args::fd, fchflags_args::flags, getvnode(), and setfflags().
int sys_fchmod | ( | struct thread * | td, |
struct fchmod_args * | uap | ||
) |
Definition at line 2964 of file vfs_syscalls.c.
References cap_fchmod_rights, fchmod_args::fd, fget(), and fchmod_args::mode.
struct fchmodat_args sys_fchmodat | ( | struct thread * | td, |
struct fchmodat_args * | uap | ||
) |
Definition at line 2891 of file vfs_syscalls.c.
int sys_fchown | ( | struct thread * | td, |
struct fchown_args * | uap | ||
) |
Definition at line 3096 of file vfs_syscalls.c.
References cap_fchown_rights, fchown_args::fd, fget(), fchown_args::gid, and fchown_args::uid.
int sys_fchownat | ( | struct thread * | td, |
struct fchownat_args * | uap | ||
) |
Definition at line 3036 of file vfs_syscalls.c.
References fchownat_args::fd, fchownat_args::flag, fchownat_args::gid, kern_fchownat(), fchownat_args::path, and fchownat_args::uid.
int sys_fdatasync | ( | struct thread * | td, |
struct fdatasync_args * | uap | ||
) |
Definition at line 3594 of file vfs_syscalls.c.
References kern_fsync().
int sys_fhlink | ( | struct thread * | td, |
struct fhlink_args * | uap | ||
) |
Definition at line 4470 of file vfs_syscalls.c.
References fhlink_args::fhp, kern_fhlinkat(), and fhlink_args::to.
int sys_fhlinkat | ( | struct thread * | td, |
struct fhlinkat_args * | uap | ||
) |
Definition at line 4484 of file vfs_syscalls.c.
References fhlinkat_args::fhp, kern_fhlinkat(), fhlinkat_args::to, and fhlinkat_args::tofd.
int sys_fhopen | ( | struct thread * | td, |
struct fhopen_args * | uap | ||
) |
Definition at line 4567 of file vfs_syscalls.c.
References fhopen_args::flags, kern_fhopen(), and fhopen_args::u_fhp.
int sys_fhreadlink | ( | struct thread * | td, |
struct fhreadlink_args * | uap | ||
) |
Definition at line 4527 of file vfs_syscalls.c.
References fhreadlink_args::buf, fhreadlink_args::bufsize, fhreadlink_args::fhp, kern_readlink_vp(), priv_check(), vfs_busyfs(), vfs_unbusy(), and vput().
int sys_fhstat | ( | struct thread * | td, |
struct fhstat_args * | uap | ||
) |
Definition at line 4655 of file vfs_syscalls.c.
References kern_fhstat(), fhstat_args::sb, and fhstat_args::u_fhp.
int sys_fhstatfs | ( | struct thread * | td, |
struct fhstatfs_args * | uap | ||
) |
Definition at line 4701 of file vfs_syscalls.c.
References fhstatfs_args::buf, free(), kern_fhstatfs(), malloc(), and fhstatfs_args::u_fhp.
struct fstatat_args sys_fstatat | ( | struct thread * | td, |
struct fstatat_args * | uap | ||
) |
Definition at line 2176 of file vfs_syscalls.c.
int sys_fstatfs | ( | struct thread * | td, |
struct fstatfs_args * | uap | ||
) |
Definition at line 358 of file vfs_syscalls.c.
References fstatfs_args::buf, fstatfs_args::fd, free(), kern_fstatfs(), and malloc().
int sys_fsync | ( | struct thread * | td, |
struct fsync_args * | uap | ||
) |
Definition at line 3587 of file vfs_syscalls.c.
References fsync_args::fd, and kern_fsync().
int sys_funlinkat | ( | struct thread * | td, |
struct funlinkat_args * | uap | ||
) |
Definition at line 1894 of file vfs_syscalls.c.
References funlinkat_args::dfd, funlinkat_args::fd, funlinkat_args::flag, kern_funlinkat_ex(), and funlinkat_args::path.
int sys_futimens | ( | struct thread * | td, |
struct futimens_args * | uap | ||
) |
Definition at line 3364 of file vfs_syscalls.c.
References kern_futimens().
int sys_futimes | ( | struct thread * | td, |
struct futimes_args * | uap | ||
) |
Definition at line 3330 of file vfs_syscalls.c.
References futimes_args::fd, kern_futimes(), and futimes_args::tptr.
int sys_futimesat | ( | struct thread * | td, |
struct futimesat_args * | uap | ||
) |
Definition at line 3256 of file vfs_syscalls.c.
References futimesat_args::fd, kern_utimesat(), futimesat_args::path, and futimesat_args::times.
int sys_getdirentries | ( | struct thread * | td, |
struct getdirentries_args * | uap | ||
) |
Definition at line 4153 of file vfs_syscalls.c.
References kern_getdirentries().
int sys_getfh | ( | struct thread * | td, |
struct getfh_args * | uap | ||
) |
Definition at line 4398 of file vfs_syscalls.c.
References getfh_args::fhp, getfh_args::fname, and kern_getfhat().
int sys_getfhat | ( | struct thread * | td, |
struct getfhat_args * | uap | ||
) |
Definition at line 4421 of file vfs_syscalls.c.
References getfhat_args::fd, getfhat_args::fhp, getfhat_args::flags, kern_getfhat(), and getfhat_args::path.
int sys_getfsstat | ( | struct thread * | td, |
struct getfsstat_args * | uap | ||
) |
Definition at line 407 of file vfs_syscalls.c.
References getfsstat_args::buf, getfsstat_args::bufsize, count, kern_getfsstat(), and getfsstat_args::mode.
int sys_lchflags | ( | struct thread * | td, |
struct lchflags_args * | uap | ||
) |
Definition at line 2793 of file vfs_syscalls.c.
References lchflags_args::flags, kern_chflagsat(), and lchflags_args::path.
int sys_lchmod | ( | struct thread * | td, |
struct lchmod_args * | uap | ||
) |
Definition at line 2924 of file vfs_syscalls.c.
References kern_fchmodat(), lchmod_args::mode, and lchmod_args::path.
int sys_lchown | ( | struct thread * | td, |
struct lchown_args * | uap | ||
) |
Definition at line 3078 of file vfs_syscalls.c.
References lchown_args::gid, kern_fchownat(), lchown_args::path, and lchown_args::uid.
int sys_lgetfh | ( | struct thread * | td, |
struct lgetfh_args * | uap | ||
) |
Definition at line 4384 of file vfs_syscalls.c.
References lgetfh_args::fhp, lgetfh_args::fname, and kern_getfhat().
int sys_link | ( | struct thread * | td, |
struct link_args * | uap | ||
) |
Definition at line 1518 of file vfs_syscalls.c.
References kern_linkat(), link_args::link, and link_args::path.
int sys_linkat | ( | struct thread * | td, |
struct linkat_args * | uap | ||
) |
Definition at line 1535 of file vfs_syscalls.c.
References linkat_args::fd1, linkat_args::fd2, linkat_args::flag, kern_linkat(), linkat_args::path1, and linkat_args::path2.
int sys_lpathconf | ( | struct thread * | td, |
struct lpathconf_args * | uap | ||
) |
Definition at line 2587 of file vfs_syscalls.c.
References kern_pathconf(), lpathconf_args::name, lpathconf_args::path, and value.
int sys_lseek | ( | struct thread * | td, |
struct lseek_args * | uap | ||
) |
Definition at line 2004 of file vfs_syscalls.c.
References lseek_args::fd, kern_lseek(), lseek_args::offset, and lseek_args::whence.
int sys_lutimes | ( | struct thread * | td, |
struct lutimes_args * | uap | ||
) |
Definition at line 3294 of file vfs_syscalls.c.
References kern_lutimes(), lutimes_args::path, and lutimes_args::tptr.
int sys_mkdir | ( | struct thread * | td, |
struct mkdir_args * | uap | ||
) |
Definition at line 3801 of file vfs_syscalls.c.
References kern_mkdirat(), mkdir_args::mode, and mkdir_args::path.
int sys_mkdirat | ( | struct thread * | td, |
struct mkdirat_args * | uap | ||
) |
Definition at line 3816 of file vfs_syscalls.c.
References mkdirat_args::fd, kern_mkdirat(), mkdirat_args::mode, and mkdirat_args::path.
int sys_mkfifo | ( | struct thread * | td, |
struct mkfifo_args * | uap | ||
) |
Definition at line 1432 of file vfs_syscalls.c.
References kern_mkfifoat(), mkfifo_args::mode, and mkfifo_args::path.
int sys_mkfifoat | ( | struct thread * | td, |
struct mkfifoat_args * | uap | ||
) |
Definition at line 1447 of file vfs_syscalls.c.
References mkfifoat_args::fd, kern_mkfifoat(), mkfifoat_args::mode, and mkfifoat_args::path.
int sys_mknodat | ( | struct thread * | td, |
struct mknodat_args * | uap | ||
) |
Definition at line 1297 of file vfs_syscalls.c.
References mknodat_args::dev, mknodat_args::fd, kern_mknodat(), mknodat_args::mode, and mknodat_args::path.
int sys_open | ( | struct thread * | td, |
struct open_args * | uap | ||
) |
Definition at line 1095 of file vfs_syscalls.c.
References open_args::flags, kern_openat(), open_args::mode, and open_args::path.
int sys_openat | ( | struct thread * | td, |
struct openat_args * | uap | ||
) |
Definition at line 1111 of file vfs_syscalls.c.
References openat_args::fd, openat_args::flag, kern_openat(), openat_args::mode, and openat_args::path.
int sys_pathconf | ( | struct thread * | td, |
struct pathconf_args * | uap | ||
) |
Definition at line 2568 of file vfs_syscalls.c.
References kern_pathconf(), pathconf_args::name, pathconf_args::path, and value.
int sys_posix_fadvise | ( | struct thread * | td, |
struct posix_fadvise_args * | uap | ||
) |
Definition at line 4879 of file vfs_syscalls.c.
References kern_posix_error(), and kern_posix_fadvise().
int sys_quotactl | ( | struct thread * | td, |
struct quotactl_args * | uap | ||
) |
Definition at line 194 of file vfs_syscalls.c.
References quotactl_args::arg, quotactl_args::cmd, namei(), NDFREE(), quotactl_args::path, prison_allow(), quotactl_args::uid, vfs_busy(), vfs_ref(), vfs_rel(), vfs_unbusy(), and vput().
int sys_readlink | ( | struct thread * | td, |
struct readlink_args * | uap | ||
) |
Definition at line 2628 of file vfs_syscalls.c.
References readlink_args::buf, readlink_args::count, kern_readlinkat(), and readlink_args::path.
int sys_readlinkat | ( | struct thread * | td, |
struct readlinkat_args * | uap | ||
) |
Definition at line 2643 of file vfs_syscalls.c.
References readlinkat_args::buf, readlinkat_args::bufsize, readlinkat_args::fd, kern_readlinkat(), and readlinkat_args::path.
int sys_rename | ( | struct thread * | td, |
struct rename_args * | uap | ||
) |
Definition at line 3611 of file vfs_syscalls.c.
References rename_args::from, kern_renameat(), and rename_args::to.
int sys_renameat | ( | struct thread * | td, |
struct renameat_args * | uap | ||
) |
Definition at line 3627 of file vfs_syscalls.c.
References kern_renameat(), renameat_args::new, renameat_args::newfd, renameat_args::old, and renameat_args::oldfd.
int sys_revoke | ( | struct thread * | td, |
struct revoke_args * | uap | ||
) |
Definition at line 4272 of file vfs_syscalls.c.
References namei(), revoke_args::path, priv_check(), and vput().
int sys_rmdir | ( | struct thread * | td, |
struct rmdir_args * | uap | ||
) |
Definition at line 3877 of file vfs_syscalls.c.
References kern_frmdirat(), and rmdir_args::path.
int sys_statfs | ( | struct thread * | td, |
struct statfs_args * | uap | ||
) |
Definition at line 317 of file vfs_syscalls.c.
References statfs_args::buf, free(), kern_statfs(), malloc(), and statfs_args::path.
int sys_symlink | ( | struct thread * | td, |
struct symlink_args * | uap | ||
) |
Definition at line 1699 of file vfs_syscalls.c.
References kern_symlinkat(), symlink_args::link, and symlink_args::path.
int sys_symlinkat | ( | struct thread * | td, |
struct symlinkat_args * | uap | ||
) |
Definition at line 1714 of file vfs_syscalls.c.
References symlinkat_args::fd, kern_symlinkat(), and symlinkat_args::path2.
int sys_sync | ( | struct thread * | td, |
struct sync_args * | uap | ||
) |
Definition at line 176 of file vfs_syscalls.c.
References kern_sync().
int sys_truncate | ( | struct thread * | td, |
struct truncate_args * | uap | ||
) |
Definition at line 3451 of file vfs_syscalls.c.
References kern_truncate(), truncate_args::length, and truncate_args::path.
int sys_umask | ( | struct thread * | td, |
struct umask_args * | uap | ||
) |
Definition at line 4250 of file vfs_syscalls.c.
References umask_args::newmask.
int sys_undelete | ( | struct thread * | td, |
struct undelete_args * | uap | ||
) |
Definition at line 1799 of file vfs_syscalls.c.
References bwillwrite(), namei(), NDFREE(), undelete_args::path, vn_finished_write(), vn_start_write(), vput(), and vrele().
int sys_unlink | ( | struct thread * | td, |
struct unlink_args * | uap | ||
) |
Definition at line 1849 of file vfs_syscalls.c.
References kern_funlinkat(), and unlink_args::path.
int sys_unlinkat | ( | struct thread * | td, |
struct unlinkat_args * | uap | ||
) |
Definition at line 1878 of file vfs_syscalls.c.
References unlinkat_args::fd, unlinkat_args::flag, kern_funlinkat_ex(), and unlinkat_args::path.
int sys_utimensat | ( | struct thread * | td, |
struct utimensat_args * | uap | ||
) |
Definition at line 3400 of file vfs_syscalls.c.
References kern_utimensat().
int sys_utimes | ( | struct thread * | td, |
struct utimes_args * | uap | ||
) |
Definition at line 3241 of file vfs_syscalls.c.
References kern_utimesat(), utimes_args::path, and utimes_args::tptr.
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" | |||
) |
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 | , | ||
unprivileged_chroot | , | ||
CTLFLAG_RW | , | ||
& | unprivileged_chroot, | ||
0 | , | ||
"Unprivileged processes can use chroot(2)" | |||
) |
|
static |
Definition at line 2059 of file vfs_syscalls.c.
References accmode, and vn_writechk().
Referenced by kern_accessat().
int amode |
Definition at line 2115 of file vfs_syscalls.c.
Referenced by acl_nfs4_sync_acl_from_mode_draft(), and kern_accessat().
int atflag |
Definition at line 2780 of file vfs_syscalls.c.
Referenced by kern_chflagsat().
struct stat* buf |
Definition at line 2423 of file vfs_syscalls.c.
Referenced by _sglist_append_buf(), aio_biocleanup(), aio_qbio(), be_uuid_dec(), be_uuid_enc(), bitset_strprint(), bitset_strscan(), bnoreuselist(), buf_vlist_add(), bus_dmamap_load(), cluster_callback(), cluster_collectbufs(), cluster_rbuild(), cluster_read(), cluster_wbuild(), cluster_write(), compress_chunk(), constty_set(), cpusetobj_strprint(), cpusetobj_strscan(), device_log(), device_printf(), dump_append(), dump_write_headers(), dumpdevname_sysctl_handler(), dumpsys_buf_seek(), fail_point_set(), fail_point_sysctl(), fail_sysctl_drain_func(), flushbuflist(), gbincore(), gbincore_unlocked(), get_fpregset(), get_prstatus(), getcreddomainname(), getcredhostname(), getcredhostuuid(), getenv_array(), init_static_kenv(), kdb_sysctl_current(), kdb_sysctl_panic_str(), kenv_release(), kern___realpathat(), kern_alternate_path(), kern_do_statfs(), kern_fhstatfs(), kern_fstatfs(), kern_getdirentries(), kern_getfsstat(), kern_pread(), kern_ptrace(), kern_pwrite(), kern_readlink_vp(), kern_readlinkat(), kern_recvfrom(), kern_setenv(), kern_shmctl(), kern_shmctl_locked(), kern_statfs(), kmsan_report_hook(), kmsan_report_inline(), kproc_kthread_add(), ktls_alloc_thread(), ktls_buffer_alloc(), le_uuid_dec(), le_uuid_enc(), linker_ddb_search_symbol_name(), linker_debug_search_symbol_name(), linker_search_symbol_name(), linker_search_symbol_name_flags(), logread(), m_common_hash_gethdr(), m_devget(), m_ether_tcpip_hash(), m_extadd(), m_tcpip_hash(), mb_unmapped_compress(), memset_early(), mount_devctl_event(), mqfs_read(), msgbuf_addstr(), msgbuf_getbytes(), msgbuf_peekbytes(), note_threadmd(), parse_notes(), physio(), populate_note(), preload_dump(), printf_uuid(), prison0_init(), proc_iop(), proc_read_regset(), proc_read_string(), proc_readmem(), proc_write_regset(), proc_writemem(), putnote(), Report(), sbuf_bcat(), sbuf_bcpy(), sbuf_new(), sbuf_new_for_sysctl(), sbuf_printf_uuid(), sbuf_put_bytes(), set_fpregset(), set_prstatus(), sglist_append(), sglist_append_user(), sglist_build(), sglist_count(), snprintf_uuid(), sockargs(), sooptcopyin(), sooptcopyout(), sprintf(), stats_tpl_id2name(), stats_tpl_sample_rates(), stats_v1_blob_tostr(), stats_v1_itercb_tostr_freeform(), stats_v1_itercb_tostr_json(), stats_voistatdata_hist_tostr(), stats_voistatdata_tdgst_tostr(), stats_voistatdata_tostr(), sys___getcwd(), sys_shmctl(), sysctl_build_id(), sysctl_debug_ktr_entries(), sysctl_debug_witness_channel(), sysctl_handle_domainset(), sysctl_kern_arnd(), sysctl_kern_eventtimer_timer(), sysctl_kern_msgbuf(), sysctl_sysctl_name(), sysctl_sysctl_name2oid(), sysctl_try_reclaim_vnode(), sysctl_warn_reuse(), termteken_respond(), trace_cmp(), trace_pc(), ttydisc_getc(), ttydisc_getc_uio(), ttydisc_rint_bypass(), ttydisc_rint_simple(), ttyinq_write(), ttyinq_write_nofrag(), ttyoutq_read(), ttyoutq_write(), ttyoutq_write_nofrag(), uiomove_frombuf(), uipc_bindat(), unp_connectat(), v_inval_buf_range_locked(), vfs_getopt(), vfs_mountroot_readconf(), vn_commname(), vn_extattr_get(), vn_extattr_set(), vn_fsync_buf(), vn_fullpath(), vn_fullpath_any(), vn_fullpath_any_smr(), vn_fullpath_dir(), vn_fullpath_global(), vn_fullpath_hardlink(), vn_getcwd(), vn_printf(), vn_vptocnp(), vop_stdallocate(), vop_stdvptocnp(), vpanic(), vsprintf(), vsscanf(), vtruncbuf(), witness_checkorder(), and witness_debugger().
int dirfd |
Definition at line 2113 of file vfs_syscalls.c.
Referenced by kern_alternate_path(), kern_bindat(), and kern_connectat().
int fd |
Definition at line 2421 of file vfs_syscalls.c.
Referenced by _fget(), _fgetvp(), _finstall(), _getmq(), aio_aqueue(), close_range_cloexec(), close_range_impl(), closefp(), closefp_hl(), closefp_impl(), do_fork(), dofileread(), dofilewrite(), export_file_to_kinfo(), export_file_to_sb(), export_vnode_to_kinfo(), export_vnode_to_sb(), falloc_caps(), fdalloc(), fdfree(), fdisused(), fdunused(), fdused(), fdused_init(), fget(), fget_cap(), fget_cap_noref(), fget_fcntl(), fget_mmap(), fget_only_user(), fget_read(), fget_unlocked(), fget_unlocked_seq(), fget_write(), fgetvp(), fgetvp_exec(), fgetvp_lookup_smr(), fgetvp_read(), fgetvp_rights(), finstall(), finstall_refed(), getmq(), getmq_read(), getmq_write(), getsock_cap(), getvnode(), getvnode_path(), kern___realpathat(), kern_accept4(), kern_accessat(), kern_bindat(), kern_chflagsat(), kern_close(), kern_connectat(), kern_fchmodat(), kern_fchownat(), kern_fcntl(), kern_fcntl_freebsd(), kern_fhlinkat(), kern_fpathconf(), kern_frmdirat(), kern_fspacectl(), kern_fstat(), kern_fstatfs(), kern_fsync(), kern_ftruncate(), kern_funlinkat(), kern_funlinkat_ex(), kern_futimens(), kern_futimes(), kern_getdirentries(), kern_getfhat(), kern_getpeername(), kern_getsockname(), kern_ioctl(), kern_kevent(), kern_kmq_open(), kern_kqueue(), kern_linkat_vp(), kern_lseek(), kern_mkdirat(), kern_mkfifoat(), kern_mknodat(), kern_openat(), kern_pdgetpid(), kern_pipe(), kern_posix_fadvise(), kern_posix_fallocate(), kern_pread(), kern_preadv(), kern_pwrite(), kern_pwritev(), kern_readlinkat(), kern_readv(), kern_shm_open2(), kern_socket(), kern_socketpair(), kern_specialfd(), kern_statat(), kern_symlinkat(), kern_utimensat(), kern_utimesat(), kern_writev(), knote_fdclose(), kqfd_register(), kqueue_expand(), ksem_create(), ksem_create_copyout_semid(), m_dispose_extcontrolm(), mqueue_fdclose(), notifier_remove(), notifier_search(), parse_dir_md(), pollrescan(), procdesc_find(), selrescan(), selscan(), sobindat(), soconnectat(), sys_pdfork(), sys_posix_openpt(), sysctl_ftry_reclaim_vnode(), ttyhook_register(), uipc_bindat(), uipc_connectat(), umtx_shm(), and unp_connectat().
int flag |
Definition at line 2116 of file vfs_syscalls.c.
Referenced by cache_enter_time(), dev_rel(), finit(), finit_vnode(), kern_accessat(), kern_fchmodat(), kern_fchownat(), kern_frmdirat(), kern_funlinkat(), kern_funlinkat_ex(), kern_kmq_setattr(), kern_linkat(), kern_statat(), kern_utimensat(), logread(), mount_argb(), prison_allow(), prison_flag(), prison_set_allow(), prison_set_allow_locked(), sigact_flag_test(), vfs_domount_update(), and witness_setflag().
u_long flags |
Definition at line 2779 of file vfs_syscalls.c.
Referenced by flags_to_rights(), kern_chflagsat(), kern_copy_file_range(), kern_fhopen(), kern_futimens(), kern_getfhat(), kern_openat(), kern_pathconf(), kern_utimensat(), and setfflags().
|
static |
Definition at line 1547 of file vfs_syscalls.c.
Referenced by can_hardlink().
int hardlink_check_uid = 0 |
Definition at line 1542 of file vfs_syscalls.c.
Referenced by can_hardlink().
mode_t mode |
Definition at line 2910 of file vfs_syscalls.c.
Referenced by acl_nfs4_compute_inherited_acl(), acl_nfs4_compute_inherited_acl_draft(), acl_nfs4_compute_inherited_acl_psarc(), acl_nfs4_inherit_entries(), acl_nfs4_sync_acl_from_mode(), acl_nfs4_sync_acl_from_mode_draft(), acl_nfs4_sync_mode_from_acl(), acl_nfs4_trivial_from_mode(), acl_posix1e_mode_to_entry(), acl_posix1e_mode_to_perm(), acl_posix1e_newfilemode(), acl_posix1e_perms_to_mode(), calc_remaining(), do_lock_normal(), do_lock_umutex(), dupfdopen(), intr_getaffinity(), intr_setaffinity(), kcov_ioctl(), kern_dup(), kern_fchmodat(), kern_getfsstat(), kern_kmq_open(), kern_lio_listio(), kern_mkdirat(), kern_mkfifoat(), kern_mknodat(), kern_openat(), kern_shm_open(), kern_shm_open2(), ksem_alloc(), ksem_chmod(), ksem_create(), make_dev(), make_dev_cred(), make_dev_credf(), make_dev_credv(), make_dev_p(), mqf_chmod(), mqfs_create_file(), mqfs_create_node(), pipe_chmod(), rangelock_enqueue(), remain_for_mode(), setfmode(), shm_alloc(), shm_chmod(), shmget_allocate_segment(), sigdeferstop_impl(), sys_shmget(), thread_single(), thread_single_end(), tty_makedevf(), unp_addsockcred(), vn_chmod(), vop_stdstat(), and weed_inhib().
char* path |
Definition at line 2114 of file vfs_syscalls.c.
Referenced by kern_accessat(), kern_chdir(), kern_chflagsat(), kern_fchmodat(), kern_fchownat(), kern_fhlinkat(), kern_frmdirat(), kern_funlinkat(), kern_funlinkat_ex(), kern_getfhat(), kern_linkat_vp(), kern_lutimes(), kern_mkdirat(), kern_mkfifoat(), kern_mknodat(), kern_openat(), kern_pathconf(), kern_readlinkat(), kern_statat(), kern_statfs(), kern_truncate(), kern_utimensat(), and kern_utimesat().
struct lchflags_args sys_chflagsat |
struct eaccess_args sys_faccessat |
struct lchmod_args sys_fchmodat |
struct pathconf_args sys_fstatat |
|
static |
Definition at line 970 of file vfs_syscalls.c.
Referenced by sys_chroot().