VOP_ACLCHECK(9)
π VOP_ACLCHECK β bestie, let's check an access control list for a vnode π
okay so this one lives in the Kernel Developer's Manual, section 9, and it's called VOP_ACLCHECK. no cap, it's a whole vnode call. let's get into it β¨
β¨ SYNOPSIS β¨
first, the ritual. you gotta summon the headers:
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>
and then the function itself, looking all main character:
int
VOP_ACLCHECK(struct vnode *vp, acl_type_t type, struct acl *aclp,
struct ucred *cred, struct thread *td);
she takes five arguments and returns an int. iconic behavior honestly π«Ά
πΈ DESCRIPTION πΈ
so what does she do. this vnode call is your girl for figuring out whether a particular access control list (that's ACL for short, iykyk) is actually valid for a particular file or directory. vibe check on the ACL. that's the whole job. π
and here's the cast of arguments, one by one:
vpβ the vnode of the file or directory. the object in question, the star of the show πtypeβ the type of ACL you wanna check. gotta say which flavor.aclpβ a pointer to anaclstructure, and you pull the ACL data out of it. she's your source of truth.credβ the user credentials used to authorize the request. who's asking, basically.tdβ the thread that's checking the ACL. the one holding the clipboard π
ngl, thecredpointer can beNULLβ and that means access control checks are not to be performed, if possible. the reason you'd ever do this? it lets the kernel authorize ACL verification that the active process might not otherwise be permitted to do. so like, the kernel gets a hall pass π
also important, and I need you to hear me on this one: the vnode ACL interface defines the syntax, not the semantics, of file and directory ACL interfaces. so it tells you how to say it, not what it means. if you want more deets on ACL management in the kernel, go read acl(9). π¦
π LOCKS π
no locks required to call this vnode method. zero. none. and here's the cute part β any locks held on entry will be held on exit. she does not touch your locks. she does not take your locks. she leaves them exactly where she found them. respectful queen π
β RETURN VALUES β
so if the aclp pointer points to a valid ACL of type type for the object vp? you get zero back. slay. π
otherwise? you get an appropriate error code. and that's when you scroll down to the next section.
π ERRORS π
here's the whole roster of ways this can go sideways:
[EINVAL]β the ACL type you passed is invalid for this vnode, OR the ACL data itself is invalid. something's wrong with the input, bestie.[EACCES]β the file or directory ACL does not permit access. denied. not for you. π«[ENOMEM]β there's not enough memory available to fulfill the request. she's trying her best but the RAM said no π[EOPNOTSUPP]β the file system does not supportVOP_ACLCHECK(). at all. it's just not that kind of file system. π
π SEE ALSO π
go read these next, fr fr:
π«Ά AUTHORS π«Ά
this manual page was written by Robert Watson. thank you for your service, king π
and that's the whole page, bestie!! this one's from the Debian edition, dated December 23, 1999 β a vintage, truly, and she still ate. now go check those ACLs responsibly πβ¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1999 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms