FreeBSD kernel kern code
|
#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>
Go to the source code of this file.
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 |
__FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 1584 of file vfs_syscalls.c.
References groupmember(), and priv_check_cred().
Referenced by kern_linkat().
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().
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().
|
static |
Definition at line 853 of file vfs_syscalls.c.
References fd.
Referenced by change_root().
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().
|
static |
Definition at line 1000 of file vfs_syscalls.c.
Referenced by kern_openat().
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().
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.
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().
|
static |
Referenced by kern_futimes(), kern_lutimes(), and kern_utimesat().
|
static |
Definition at line 3199 of file vfs_syscalls.c.
References vfs_timestamp().
int getvnode | ( | struct filedesc * | fdp, |
int | fd, | ||
cap_rights_t | rights, | ||
struct file ** | fpp | ||
) |
Definition at line 4340 of file vfs_syscalls.c.
References badfileops, cap_funwrap(), and fget_unlocked().
Referenced by kern_fstatfs(), kern_futimes(), kern_getdirentries(), sys___acl_aclcheck_fd(), sys___acl_delete_fd(), sys___acl_get_fd(), sys___acl_set_fd(), sys_extattr_delete_fd(), sys_extattr_get_fd(), sys_extattr_list_fd(), sys_extattr_set_fd(), sys_fchdir(), sys_fchflags(), and sys_fsync().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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 |
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().
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().
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().
|
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().
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.
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().
int sys_chmod | ( | struct thread * | td, |
struct chmod_args * | uap | ||
) |
Definition at line 2912 of file vfs_syscalls.c.
References kern_chmod().
int sys_chown | ( | struct thread * | td, |
struct chown_args * | uap | ||
) |
Definition at line 3067 of file vfs_syscalls.c.
References kern_chown().
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().
int sys_eaccess | ( | struct thread * | td, |
struct eaccess_args * | uap | ||
) |
Definition at line 2243 of file vfs_syscalls.c.
References kern_eaccess().
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.
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().
int sys_fchflags | ( | struct thread * | td, |
struct fchflags_args * | uap | ||
) |
Definition at line 2845 of file vfs_syscalls.c.
References getvnode(), and setfflags().
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.
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.
int sys_fchown | ( | struct thread * | td, |
struct fchown_args * | uap | ||
) |
Definition at line 3174 of file vfs_syscalls.c.
References fget().
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.
int sys_fhopen | ( | struct thread * | td, |
struct fhopen_args * | uap | ||
) |
Definition at line 4486 of file vfs_syscalls.c.
References accmode, falloc(), fdclose(), finit(), fhopen_args::flags, priv_check(), type, fhopen_args::u_fhp, vfs_busyfs(), vfs_ref(), vfs_rel(), vfs_unbusy(), vn_finished_write(), vn_start_write(), vn_writechk(), vnops, vput(), and vrele().
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().
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.
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.
int sys_fstatfs | ( | struct thread * | td, |
struct fstatfs_args * | uap | ||
) |
Definition at line 354 of file vfs_syscalls.c.
References kern_fstatfs().
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().
int sys_futimes | ( | struct thread * | td, |
struct futimes_args * | uap | ||
) |
Definition at line 3393 of file vfs_syscalls.c.
References kern_futimes().
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.
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().
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().
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().
int sys_getfsstat | ( | struct thread * | td, |
struct getfsstat_args * | uap | ||
) |
Definition at line 445 of file vfs_syscalls.c.
References kern_getfsstat().
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().
int sys_lchmod | ( | struct thread * | td, |
struct lchmod_args * | uap | ||
) |
Definition at line 2962 of file vfs_syscalls.c.
References kern_fchmodat().
int sys_lchown | ( | struct thread * | td, |
struct lchown_args * | uap | ||
) |
Definition at line 3142 of file vfs_syscalls.c.
References kern_lchown().
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().
int sys_link | ( | struct thread * | td, |
struct link_args * | uap | ||
) |
Definition at line 1539 of file vfs_syscalls.c.
References kern_link().
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.
int sys_lpathconf | ( | struct thread * | td, |
struct lpathconf_args * | uap | ||
) |
Definition at line 2596 of file vfs_syscalls.c.
References kern_pathconf().
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().
int sys_lstat | ( | struct thread * | td, |
struct lstat_args * | uap | ||
) |
Definition at line 2462 of file vfs_syscalls.c.
References kern_lstat().
int sys_lutimes | ( | struct thread * | td, |
struct lutimes_args * | uap | ||
) |
Definition at line 3349 of file vfs_syscalls.c.
References kern_lutimes().
int sys_mkdir | ( | struct thread * | td, |
struct mkdir_args * | uap | ||
) |
Definition at line 3770 of file vfs_syscalls.c.
References kern_mkdir().
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.
int sys_mkfifo | ( | struct thread * | td, |
struct mkfifo_args * | uap | ||
) |
Definition at line 1438 of file vfs_syscalls.c.
References kern_mkfifo().
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.
int sys_mknod | ( | struct thread * | td, |
struct mknod_args * | uap | ||
) |
Definition at line 1285 of file vfs_syscalls.c.
References kern_mknod().
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.
int sys_nlstat | ( | struct thread * | td, |
struct nlstat_args * | uap | ||
) |
Definition at line 2549 of file vfs_syscalls.c.
References cvtnstat(), and kern_lstat().
int sys_nstat | ( | struct thread * | td, |
struct nstat_args * | uap | ||
) |
Definition at line 2520 of file vfs_syscalls.c.
References cvtnstat(), and kern_stat().
int sys_open | ( | struct thread * | td, |
struct open_args * | uap | ||
) |
Definition at line 1046 of file vfs_syscalls.c.
References kern_open().
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.
int sys_pathconf | ( | struct thread * | td, |
struct pathconf_args * | uap | ||
) |
Definition at line 2578 of file vfs_syscalls.c.
References kern_pathconf().
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().
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().
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().
int sys_readlink | ( | struct thread * | td, |
struct readlink_args * | uap | ||
) |
Definition at line 2642 of file vfs_syscalls.c.
References kern_readlink().
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.
int sys_rename | ( | struct thread * | td, |
struct rename_args * | uap | ||
) |
Definition at line 3614 of file vfs_syscalls.c.
References kern_rename().
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.
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().
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.
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().
int sys_symlink | ( | struct thread * | td, |
struct symlink_args * | uap | ||
) |
Definition at line 1691 of file vfs_syscalls.c.
References kern_symlink().
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.
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().
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().
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().
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.
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.
int sys_utimes | ( | struct thread * | td, |
struct utimes_args * | uap | ||
) |
Definition at line 3281 of file vfs_syscalls.c.
References kern_utimes().
SYSCTL_INT | ( | _kern | , |
OID_AUTO | , | ||
chroot_allow_open_directories | , | ||
CTLFLAG_RW | , | ||
& | chroot_allow_open_directories, | ||
0 | , | ||
"" | |||
) |
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 |
Definition at line 2115 of file vfs_syscalls.c.
References accmode, and vn_writechk().
Referenced by kern_accessat().
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().
|
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 flag |
Definition at line 2159 of file vfs_syscalls.c.
Referenced by cache_enter_time(), dev_rel(), finit(), kern_kmq_setattr(), sys_fchownat(), sys_linkat(), sys_unlinkat(), vfs_domount_update(), and witness_setflag().
|
static |
Definition at line 1577 of file vfs_syscalls.c.
int hardlink_check_uid = 0 |
Definition at line 1572 of file vfs_syscalls.c.
mode_t mode |
Definition at line 2158 of file vfs_syscalls.c.
Referenced by acl_nfs4_sync_mode_from_acl(), acl_posix1e_mode_to_entry(), acl_posix1e_newfilemode(), acl_posix1e_perms_to_mode(), gz_open(), kern_statat_vnhook(), ksem_alloc(), make_dev_credv(), mqfs_create_node(), rangelock_enqueue(), shm_alloc(), sys_fchmodat(), sys_shmget(), tty_makedev(), and vn_stat().
char * path |
Definition at line 2157 of file vfs_syscalls.c.
Referenced by kern_jail_set(), kern_kmq_open(), ksem_create(), ksem_insert(), linker_basename(), parse_dir_md(), shm_insert(), start_init(), sys_kmq_unlink(), sys_ksem_unlink(), sys_shm_open(), sys_shm_unlink(), and sys_unlinkat().
struct eaccess_args sys_faccessat |
struct lchmod_args sys_fchmodat |
struct lstat_args sys_fstatat |