VOP_SETACL(9)
π VOP_SETACL π
okay so bestie, welcome to the VOP_SETACL(9) page β the one that's all about setting the access control list (ACL) for a vnode. it's a kernel developer manual, but we're gonna make it make sense, fr fr π
β¨ NAME β¨
VOP_SETACL β set the access control list for a vnode. yup, that's the whole vibe.
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>
int
VOP_SETACL(struct vnode *vp, acl_type_t type, struct acl *aclp,
struct ucred *cred, struct thread *td);
like, copy-paste this exactly, no cap π«Ά
π DESCRIPTION π
so this vnode call is literally how you set the access control list (ACL) for a file or directory. it's giving security gatekeeping energy π
here's the breakdown of its arguments, bestie:
vpβ the vnode of the file or directory. like, the actual thing you're touching.typeβ the type of ACL to set. gotta know what flavor you're working with.aclpβ a pointer to an ACL structure from which to retrieve the ACL data. it's the source of truth.credβ the user credentials to use in authorizing the request. who's asking?tdβ the thread setting the ACL. the main character of this operation π
now some very important details:
the aclp pointer may be NULL to indicate that the specified ACL should be deleted. so NULL = yeet it ποΈ
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 changes that the active process might not be permitted to make. like, the kernel gets a vip pass, iykyk.
also, real talk: the vnode ACL interface defines the syntax, and not semantics, of file and directory ACL interfaces. more info about ACL management in kernel can be found in acl(9). go read it, bestie.
π LOCKS π
the vnode will be locked on entry and should remain locked on return. no unlocking mid-operation, that's messy. periodt.
π RETURN VALUES π
if the ACL is successfully set, then zero is returned. slay. otherwise, an appropriate error code is returned. and we list those below π
π ERRORS π
[EINVAL]β the ACL type passed is invalid for this vnode, or the ACL data is invalid. like, wrong vibe entirely.[EACCES]β the caller does not have the appropriate privilege. no permission, no entry π[ENOMEM]β sufficient memory is not available to fulfill the request. brain empty, no thoughts.[EOPNOTSUPP]β the file system does not supportVOP_SETACL(). it's just not that girl.[ENOSPC]β the file system is out of space. full house, no room.[EROFS]β the file system is read-only. can't touch this π₯
π¦ SEE ALSO π¦
go click around, bestie, it's a whole ecosystem π
π AUTHORS π
this manual page was written by Robert Watson. iconic behavior, we love to see it π
okay that's the whole page! this was the Debian version, dated December 23, 1999 β a vintage slay π β¨ go forth and set those ACLs, bestie! π¦πΈ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1999, 2000, 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