VOP_GETACL(9)

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

πŸ’– NAME πŸ’–

VOP_GETACL β€” retrieve access control list for a vnode. that's the name section, short and iconic ✨

okay bestie, welcome to VOP_GETACL(9), straight from the Kernel Developer's Manual. this page is lowkey all about pulling the access control list (ACL) off a file or directory β€” very demure, very kernel πŸ’…

✨ SYNOPSIS ✨

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

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

🌸 DESCRIPTION 🌸

this vnode call may be used to retrieve the access control list (ACL) from a file or directory. no cap, that's the whole mission 🫢

its arguments are:

  • vp β€” the vnode of the file or directory.
  • type β€” the type of ACL to retrieve.
  • aclp β€” a pointer to an ACL structure to receive the ACL data.
  • cred β€” the user credentials to use in authorizing the request.
  • td β€” the thread requesting the ACL.
πŸ‘€ okay so the cred pointer may be NULL to indicate that access control checks are not to be performed, if possible. this cred setting might be used to allow the kernel to authorize ACL retrieval that the active process might not be permitted to do. that's the tea.

big heads up: the vnode ACL interface defines the syntax, and not semantics, of file and directory ACL interfaces. more information about ACL management in kernel may be found in acl(9) 🌈

πŸ”’ LOCKS πŸ”’

on entry, the vnode will be locked, and it should remain locked on return β€” that's the lock vibe check, periodt πŸ”

πŸŽ€ RETURN VALUES πŸŽ€

if the aclp pointer will point to a valid ACL, then zero is returned. otherwise, an appropriate error code is returned. slay πŸ’…

πŸ’€ ERRORS πŸ’€

when things go sideways, bestie, you might see:

  • [EINVAL] β€” the ACL type passed is invalid for this vnode.
  • [EACCES] β€” the caller does not have the appropriate privilege.
  • [ENOMEM] β€” sufficient memory is not available to fulfill the request.
  • [EOPNOTSUPP] β€” the file system does not support VOP_GETACL().

πŸ‘€ SEE ALSO πŸ‘€

acl(9), vnode(9), VOP_ACLCHECK(9), VOP_SETACL(9) β€” go read these too, iykyk πŸ“š

🫢 AUTHORS 🫢

this manual page was written by Robert Watson. give him his flowers πŸ’


and that's the whole page, bestie 🫢 source/version: Debian; date: December 23, 1999; page: VOP_GETACL(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from