summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-05-30 13:59:05 +0000
committertrasz <trasz@FreeBSD.org>2009-05-30 13:59:05 +0000
commit0c63bcbfa4fb9f208ea176334478d17cafd66eac (patch)
tree9fe18e8e703d17defbd688d53ac96d8a33a828de /share
parent3b6c3312d5f59aa27a7bb6530afb6f2546934c5f (diff)
downloadFreeBSD-src-0c63bcbfa4fb9f208ea176334478d17cafd66eac.zip
FreeBSD-src-0c63bcbfa4fb9f208ea176334478d17cafd66eac.tar.gz
Add VOP_ACCESSX, which can be used to query for newly added V*
permissions, such as VWRITE_ACL. For a filsystems that don't implement it, there is a default implementation, which works as a wrapper around VOP_ACCESS. Reviewed by: rwatson@
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/Makefile1
-rw-r--r--share/man/man9/VOP_ACCESS.921
2 files changed, 20 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 45b5438..7515a20 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1288,6 +1288,7 @@ MLINKS+=vm_page_io.9 vm_page_io_finish.9 \
MLINKS+=vm_page_wakeup.9 vm_page_busy.9 \
vm_page_wakeup.9 vm_page_flash.9
MLINKS+=vm_page_wire.9 vm_page_unwire.9
+MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9
MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \
VOP_ATTRIB.9 VOP_SETATTR.9
MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \
diff --git a/share/man/man9/VOP_ACCESS.9 b/share/man/man9/VOP_ACCESS.9
index 76073db..ec4046d 100644
--- a/share/man/man9/VOP_ACCESS.9
+++ b/share/man/man9/VOP_ACCESS.9
@@ -29,17 +29,20 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 24, 1996
+.Dd May 30, 2009
.Os
.Dt VOP_ACCESS 9
.Sh NAME
-.Nm VOP_ACCESS
+.Nm VOP_ACCESS ,
+.Nm VOP_ACCESSX
.Nd "check access permissions of a file or Unix domain socket"
.Sh SYNOPSIS
.In sys/param.h
.In sys/vnode.h
.Ft int
.Fn VOP_ACCESS "struct vnode *vp" "accmode_t accmode" "struct ucred *cred" "struct thread *td"
+.Ft int
+.Fn VOP_ACCESSX "struct vnode *vp" "accmode_t accmode" "struct ucred *cred" "struct thread *td"
.Sh DESCRIPTION
This entry point checks the access permissions of the file against the
given credentials.
@@ -63,6 +66,20 @@ is a mask which can contain flags described in <sys/vnode.h>, e.g.
.Dv VWRITE
or
.Dv VEXEC .
+For
+.Fn VOP_ACCESS ,
+the only flags that may be set in
+.Fa accmode
+are
+.Dv VEXEC ,
+.Dv VWRITE ,
+.Dv VREAD ,
+.Dv VADMIN
+and
+.Dv VAPPEND .
+To check for other bits, one has to use
+.Fn VOP_ACCESSX
+instead.
.Sh LOCKS
The vnode will be locked on entry and should remain locked on return.
.Sh RETURN VALUES
OpenPOWER on IntegriCloud