Expand description
Os-level state gathering for permission debugging.
Handles all system interaction: stat(), getxattr(),
ioctl(FS_IOC_GETFLAGS), statvfs(), /proc parsing, and
/etc/passwd + /etc/group resolution. gathered data is packaged
Into whyno_core::state::SystemState for the check pipeline.
Mount flags (ro, noexec, nosuid) come from statvfs() — one
Syscall, no text parsing. /proc/self/mountinfo is retained for
Metadata only (fs_type, mountpoint, device).
Modules§
- acl
- POSIX ACL gathering via
system.posix_acl_accessxattr. - error
- Error types for the gathering layer.
- fsflags
- Filesystem inode flags via
ioctl(FS_IOC_GETFLAGS). - mac
- MAC (mandatory access control) state gathering.
- mountinfo
/proc/self/mountinfoparser.- proc
/proc/<pid>/statusparser for process identity resolution.- stat
stat()gathering for path components.- statvfs
- Mount flag gathering via
statvfs(). - subject
- Subject identity resolution from various input formats.
Functions§
- gather_
state - Gathers complete OS state for a permission query.