VACCESS_ACL_NFS4(9)
π VACCESS_ACL_NFS4 β the vibe check for NFSv4 ACLs β¨
okay so bestie, this is a section 9 kernel developer's manual page β VACCESS_ACL_NFS4(9) β and it's literally about making an access-control decision using vnode parameters. buckle up, it's gonna be a cute little ride π
πΈ NAME πΈ
vaccess_acl_nfs4 β generate a NFSv4 ACL access control decision using vnode parameters π¦
no cap, that's the whole ~vibe~: you hand it stuff about a vnode, it tells you yes or no.
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>
int
vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid,
struct acl *acl, accmode_t accmode, struct ucred *cred,
int *privused);
like, copy that exactly, i'm not kidding about the includes π
π DESCRIPTION π
so this call implements the logic for the Unix discretionary file security model with NFSv4 ACL extensions, which sounds scary but honestly it's giving main character energy. it takes:
typeβ the vnode's type (anenum vtype)file_uidβ the owning UID (uid_t)file_gidβ the owning GID (gid_t)aclβ the access ACL for the file (struct acl *)accmodeβ the desired access mode (accmode_t)credβ the requesting credential (struct ucred *)privusedβ an optional call-by-referenceintpointer that returns whether privilege was required for a successful evaluation of the call
about that privused pointer, bestie: the caller may set it to NULL so they just... don't get told about privilege info at all, no drama. or it may point to an integer that will be set to 1 if privilege is used, and 0 otherwise. that's it, that's the deal π«Ά
this call is intended to support implementations of VOP_ACCESS(9), which will use their own access methods to retrieve the vnode properties, and then invoke vaccess_acl_nfs4() in order to perform the actual check. and listen β implementations of VOP_ACCESS(9) may choose to implement additional security mechanisms whose results will be composed with the return value. so your mileage is very much ~composable~ π
the algorithm used byvaccess_acl_nfs4()is based on the NFSv4 ACL evaluation algorithm, as described in NFSv4 Minor Version 1,draft-ietf-nfsv4-minorversion1-21.txt. π₯
the algorithm selects a matching entry from the access ACL, which may then be composed with an available ACL mask entry, providing Unix security compatibility. iconic behaviour honestly, it's out here bridging two worlds π
once appropriate protections are selected for the current credential, the requested access mode, in combination with the vnode type, will be compared with the discretionary rights available for the credential. and if the rights granted by discretionary protections are insufficient? then super-user privilege, if available for the credential, will also be considered. so there's a little backup plan, a little safety net, we love to see it π
π RETURN VALUES π
vaccess_acl_nfs4() will return 0 on success, or a non-zero error value on failure. that's the whole section, slay β
π§ ERRORS π§
[EACCES]β Permission denied. an attempt was made to access a file in a way forbidden by its file access permissions. rude, but fair π[EPERM]β Operation not permitted. an attempt was made to perform an operation limited to processes with appropriate privileges or to the owner of a file or other resource. nope, not you, bestie π
π SEE ALSO π
vaccess(9), vnode(9), VOP_ACCESS(9) β go read these too, they're literally the friend group π«Ά
π AUTHORS π
current implementation of vaccess_acl_nfs4() was written by Edward Tomasz Napierala <trasz@FreeBSD.org>. thank you for your service king π
π BUGS π
this manual page should include a full description of the NFSv4 ACL evaluation algorithm, or cross reference another page that does. yeah... it doesn't. we know. π it's on the list, bestie, it's on the list.
and that's the whole page!! πΈ from the Debian folks, dated September 18, 2009, VACCESS_ACL_NFS4(9) β go forth and check those permissions, i believe in you πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2001 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms