Skip to content

Conversation

@stevegrubb
Copy link
Member

This set of patches consolidate the returns codes of fapolicyd-cli around 9 simple numeric tiers. See the individual commits for details.

All return codes can be mapped to simple numeric tiers:

0 success
1 Generic/unspecified failure
2 CLI / usage error
3 Path / configuration error
4 Database / LMDB error
5 Rule / filter error
6 Daemon / IPC error
7 Filesystem / I-O / permission error
8 Internal software / OOM
9 No-op / Not-found / Nothing to do

Added a shared CLI exit status enum and updated trust file add/delete/update helpers to propagate categorized outcomes, including filter and I/O conditions.

Mapped fapolicyd-cli operations to standardized exit codes across reload/status flows, watch_fs and ignore_mounts scans, trust database checks, and argument parsing to distinguish IPC, configuration, I/O, internal, and benign no-op situations.

Documented the full return code matrix in the fapolicyd-cli(8) man page for scripting reference.
@stevegrubb
Copy link
Member Author

Merged manually.

@stevegrubb stevegrubb closed this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant