In Capsicum, capabilities are tracked on a per file descriptor basis. A typical program opens any input paths, restricts capabilities on open fds (including stdio), and then enters sandbox mode.
Once the capability mode sandbox is entered, no additional capabilities can be granted, and filesystem access via absolute paths is revoked. (Sandbox mode programs are expected to access files they already have open, or to use relative accesses to walk file trees.)
Erroneous system calls generate ECAPMODE or ENOTCAPABLE errors if they attempt to perform actions they do not have permission to do.