keyring_restrict(9)
π keyring_restrict(9) π
okay bestie, welcome to the Kernel API Manual β¨ this one lives in the kernel docs and it's all about locking a keyring down, iykyk π
β¨ NAME β¨
keyring_restrict β look up and apply a restriction to a keyring π
πΈ SYNOPSIS πΈ
int keyring_restrict (key_ref_t keyring_ref , const char *type , const char *restriction );
like, that's the whole vibe check right there π
π¦ ARGUMENTS π¦
keyring_refβ the keyring that's getting restricted, aka the main character here πtypeβ the key type that's gonna provide the restriction checker, so it's the one running the show behind the scenes πrestrictionβ the restriction options you're applying to the keyring, the actual settings fr fr β
π DESCRIPTION π
So basically, this function looks up a keyring and applies a restriction to it π The restriction itself is managed by the specific key type (not this function's problem, respectfully π), but you can configure it with the options you put in the restriction string β that part's on you, bestie π
π₯ SEE ALSO π₯
Kernel file ./security/keys/keyring.c, plus the whole friend group:
key_put_tag(9)key_remove_domain(9)restrict_link_reject(9)keyring_search_rcu(9)keyring_search(9)key_link(9)key_unlink(9)key_move(9)keyring_clear(9)
and that's the post π«Ά this lil page comes from ./security/keys and it's dated October 2026, so like, future vibes but make it kernel πβ¨ go read the keyring_restrict(9) girlies, mwah ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms