Skip to main content

Module store

Module store 

Source
Expand description

The user grant store (WP-2.13, R-155).

One file per grant at $XDG_CONFIG_HOME/mkit/grants/<grant id hex>.grant, holding the raw SPEC-WRITE-GRANTS §4.2 header value and nothing else; everything else is derived by parsing. The directory is 0700 and each file 0600, written atomically. The store is never repository-scoped: its location comes from the XDG base directory alone, and it never reads a repository path.

Grants are not secret (§12: disclosing one is harmless), but a planted file could steer grant selection, so every file is re-parsed and its owner signature re-verified on load. A bad file costs one warning and is skipped.

Structs§

GrantStore
The user grant store.
LoadReport
The result of loading the store: what verified, and one warning per problem.
StoredGrant
A grant read back from the store, already verified.

Enums§

AddOutcome
What GrantStore::add did.
StoreError

Constants§

MAX_STORE_FILES
Most files the store loads.
MAX_STORE_FILE_BYTES
Largest file the store loads. A header is at most 8,192 bytes; this bound leaves room for nothing else.