Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2008 07:41:33 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 148685 for review
Message-ID:  <200808280741.m7S7fXIQ044132@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148685

Change 148685 by trasz@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808280741.m7S7fXIQ044132>