From owner-p4-projects@FreeBSD.ORG Thu Aug 28 07:41:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7902F106567D; Thu, 28 Aug 2008 07:41:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C2771065676 for ; Thu, 28 Aug 2008 07:41:33 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2FFDB8FC1C for ; Thu, 28 Aug 2008 07:41:33 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7S7fX7x044134 for ; Thu, 28 Aug 2008 07:41:33 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7S7fXIQ044132 for perforce@freebsd.org; Thu, 28 Aug 2008 07:41:33 GMT (envelope-from trasz@freebsd.org) Date: Thu, 28 Aug 2008 07:41:33 GMT Message-Id: <200808280741.m7S7fXIQ044132@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 148685 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 07:41:33 -0000 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 . .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