PERFORCE change 148685 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Aug 28 07:41:33 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=148685
Change 148685 by trasz at trasz_traszkan on 2008/08/28 07:41:31
Update VOP_ACCESS manual page.
Affected files ...
.. //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/VOP_ACCESS.9#2 edit
Differences ...
==== //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/VOP_ACCESS.9#2 (text+ko) ====
@@ -39,7 +39,7 @@
.In sys/param.h
.In sys/vnode.h
.Ft int
-.Fn VOP_ACCESS "struct vnode *vp" "int mode" "struct ucred *cred" "struct thread *td"
+.Fn VOP_ACCESS "struct vnode *vp" "vaccess_t mode" "struct ucred *cred" "struct thread *td"
.Sh DESCRIPTION
This entry point checks the access permissions of the file against the
given credentials.
@@ -58,11 +58,7 @@
.Pp
The
.Fa mode
-is a mask which can contain
-.Dv VREAD ,
-.Dv VWRITE
-or
-.Dv VEXEC .
+is a mask which can contain flags described in <sys/vnode.h>.
.Sh LOCKS
The vnode will be locked on entry and should remain locked on return.
.Sh RETURN VALUES
@@ -71,11 +67,17 @@
.Sh PSEUDOCODE
.Bd -literal
int
-vop_access(struct vnode *vp, int mode, struct ucred *cred, struct thread *td)
+vop_access(struct vnode *vp, vaccess_t mode, struct ucred *cred, struct thread *td)
{
int error;
/*
+ * Our example does not implement granular access control.
+ */
+ if (unixify_vaccess(&mode, &error))
+ return (error);
+
+ /*
* Disallow write attempts on read-only file systems;
* unless the file is a socket, fifo, or a block or
* character device resident on the filesystem.
@@ -145,6 +147,7 @@
.El
.Sh SEE ALSO
.Xr vaccess 9 ,
+.Xr vaccess_acl_nfs4 9 ,
.Xr vaccess_acl_posix1e 9 ,
.Xr vnode 9
.Sh AUTHORS
More information about the p4-projects
mailing list