#include <sys/xattr.h>

sys/xattr.h Kernel.framework

includes: sys/types.h
2 functions · 1 macro

functionxattr_protected

int xattr_protected(const char *)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/vfs/vfs_xattr.c
Returns nonzero if the extended attribute name denotes a protected system attribute, i.e. begins with the prefix "com.apple.system."; such attributes are reserved and are not accessible through the ordinary user xattr calls.

functionxattr_validatename

int xattr_validatename(const char *)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/vfs/vfs_xattr.c
Validates an extended attribute name: it must be non-NULL, non-empty, and valid UTF-8 (checked with utf8_validatestr). Returns 0 if valid, EINVAL otherwise.

macroXATTR_MAXSIZE

Maximum extended attribute size supported by VFS
#define XATTR_MAXSIZE INT32_MAX