VOP_ACLCHECK(9)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… VOP_ACLCHECK(9) β€” the Kernel Developer's Manual page, but make it a group chat

Okay bestie, so this one is from the Kernel Developer's Manual β€” it's VOP_ACLCHECK(9) and it's your little vnode-call bestie for checking whether an access control list is even valid. Let's get into it ✨


🌸 NAME 🌸

VOP_ACLCHECK β€” check an access control list for a vnode. That's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

First, the include squad, all three of them, exactly like this:

#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>

And then the signature, iconic, no cap:

int
VOP_ACLCHECK(struct vnode *vp, acl_type_t type, struct acl *aclp,
    struct ucred *cred, struct thread *td);

πŸ’– DESCRIPTION πŸ’–

So like, this vnode call is literally here to determine the validity of a particular access control list (ACL) for a particular file or directory. Vibe check for ACLs, basically. 🫢

Its arguments are β€” and bestie, take notes, because every single one matters:

  • vp β€” the vnode of the file or directory πŸ’«
  • type β€” the type of ACL to check
  • aclp β€” a pointer to an ACL structure from which to retrieve the ACL data
  • cred β€” the user credentials to use in authorizing the request
  • td β€” the thread checking the ACL

Now, lowkey the juiciest detail: the cred pointer may be NULL, which indicates that access control checks are not to be performed, if possible. This cred setting might be used to allow the kernel to authorize ACL verification that the active process might not be permitted to do. Main character kernel energy honestly. πŸ‘‘

Also important β€” and this is a real one, not just vibes: the vnode ACL interface defines the syntax, and not the semantics, of file and directory ACL interfaces. More info about ACL management in the kernel can be found in acl(9). Go read it, iykyk. πŸ“–


πŸ”’ LOCKS πŸ”’

No locks are required to call this vnode method, and any locks held on entry will be held on exit. That's it. That's the whole lock saga. Slay, no cap. πŸ’…


⭐ RETURN VALUES ⭐

If the aclp pointer points to a valid ACL of type type for the object vp, then zero is returned. Otherwise, an appropriate error code is returned. Zero = the win, bestie. 🌈


πŸ’€ ERRORS πŸ’€

Here's the full album of possible problems, no skips:

  • [EINVAL] β€” the ACL type passed is invalid for this vnode, or the ACL data is invalid.
  • [EACCES] β€” the file or directory ACL does not permit access.
  • [ENOMEM] β€” sufficient memory is not available to fulfill the request.
  • [EOPNOTSUPP] β€” the file system does not support VOP_ACLCHECK().
If you see EOPNOTSUPP, that's the file system telling you it literally does not support VOP_ACLCHECK(). Not a you problem, it's a them problem. πŸ™ˆ

πŸŽ€ SEE ALSO πŸŽ€

Your reading list, in order, exactly as listed:


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Robert Watson. Absolute legend behavior. 🌟


And that's the page, bestie! This one's a Debian situation, dated December 23, 1999, and the page is β€” you guessed it β€” VOP_ACLCHECK(9). Go forth and check those ACLs, fr fr. πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from