{"id":3887,"date":"2022-12-20T17:28:20","date_gmt":"2022-12-20T20:28:20","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/keyutils-man7\/"},"modified":"2022-12-20T17:28:20","modified_gmt":"2022-12-20T20:28:20","slug":"keyutils-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/keyutils-man7\/","title":{"rendered":"KEYUTILS (man7)"},"content":{"rendered":"<h1 align=\"center\">KEYUTILS<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#UTILITIES\">UTILITIES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">keyutils \u2212 in-kernel key management utilities<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>keyutils<\/b> package is a library and a set of utilities for accessing the kernel <b>keyrings<\/b> facility.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A header file is supplied to provide the definitions and declarations required to access the library:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>#include <keyutils.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To link with the library, the following:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>\u2212lkeyutils<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">should be specified to the linker.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Three system calls are provided: <b><br \/> add_key<\/b>(2)<\/p>\n<p style=\"margin-left:22%;\">Supply a new key to the kernel.<\/p>\n<p style=\"margin-left:11%;\"><b>request_key<\/b>(2)<\/p>\n<p style=\"margin-left:22%;\">Find an existing key for use, or, optionally, create one if one does not exist.<\/p>\n<p style=\"margin-left:11%;\"><b>keyctl<\/b>(2)<\/p>\n<p style=\"margin-left:22%;\">Control a key in various ways. The library provides a variety of wrappers around this system call and those should be used rather than calling it directly.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>add_key<\/b>(2), <b>request_key<\/b>(2), and <b>keyctl<\/b>(2) manual pages for more information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>keyctl<\/b>() wrappers are listed on the <b>keyctl<\/b>(3) manual page.<\/p>\n<h2>UTILITIES <a name=\"UTILITIES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">A program is provided to interact with the kernel facility by a number of subcommands, e.g.:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>keyctl add user foo bar @s<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>keyctl<\/b>(1) manual page for information on that.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The kernel has the ability to upcall to userspace to fabricate new keys. This can be triggered by <b>request_key<\/b>(), but userspace is better off using <b>add_key<\/b>() instead if it possibly can.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The upcalling mechanism is usually routed via the <b>request\u2212key<\/b>(8) program. What this does with any particular key is configurable in:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>\/etc\/request\u2212key.conf <br \/> \/etc\/request\u2212key.d\/<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>request\u2212key.conf<\/b>(5) and the <b>request\u2212key<\/b>(8) manual pages for more information.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>keyctl<\/b>(1), <b>keyctl<\/b>(3), <b>keyrings<\/b>(7), <b>persistent\u2212keyring<\/b>(7), <b>process\u2212keyring<\/b>(7), <b>session\u2212keyring<\/b>(7), <b>thread\u2212keyring<\/b>(7), <b>user\u2212keyring<\/b>(7), <b>user\u2212session\u2212keyring<\/b>(7), <b>pam_keyinit<\/b>(8)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  keyutils \u2212 in-kernel key management utilities <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,982,972],"class_list":["post-3887","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-keyutils","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3887"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3887\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}