---
name: "sysdecode_cap_rights"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/sysdecode_cap_rights"
---

# sysdecode\_cap\_rights(3)

output list of capability rights

## NAME

**sysdecode\_cap\_rights** – output list of capability rights

## LIBRARY

library “libsysdecode”

## SYNOPSIS

**#include \<sysdecode.h\>**

*void*\

**sysdecode\_cap\_rights**(*FILE \*fp*, *cap\_rights\_t \*rightsp*);

## DESCRIPTION

The **sysdecode\_cap\_rights**() function outputs a comma-separated list of capability rights at *rightsp* to the stream *fp*.

Note that some capability rights are supersets of others; for example, CAP\_PREAD is the union of CAP\_READ and CAP\_SEEK. **sysdecode\_cap\_rights**() emits a minimal list of rights whose union is equal to *\*rightsp*. For example, if both CAP\_READ and CAP\_SEEK are set in *\*rightsp*, then **sysdecode\_cap\_rights**() will include only CAP\_PREAD in the output list.

## SEE ALSO

[sysdecode(3)](/sysdecode/3.md)
