{"id":4132,"date":"2022-12-20T17:39:29","date_gmt":"2022-12-20T20:39:29","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/process-keyring-man7\/"},"modified":"2022-12-20T17:39:29","modified_gmt":"2022-12-20T20:39:29","slug":"process-keyring-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/process-keyring-man7\/","title":{"rendered":"PROCESS-KEYRING (man7)"},"content":{"rendered":"<h1 align=\"center\">PROCESS-KEYRING<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">process-keyring \u2212 per-process shared keyring<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The process keyring is a keyring used to anchor keys on behalf of a process. It is created only when a process requests it. The process keyring has the name (description) <i>_pid<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A special serial number value, <b>KEY_SPEC_PROCESS_KEYRING<\/b>, is defined that can be used in lieu of the actual serial number of the calling process\u2019s process keyring.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">From the <b>keyctl<\/b>(1) utility, \u2019<b>@p<\/b>\u2019 can be used instead of a numeric key ID in much the same way, but since <b>keyctl<\/b>(1) is a program run after forking, this is of no utility.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A thread created using the <b>clone<\/b>(2) <b>CLONE_THREAD<\/b> flag has the same process keyring as the caller of <b>clone<\/b>(2). When a new process is created using <b>fork<\/b>() it initially has no process keyring. A process\u2019s process keyring is cleared on <b>execve<\/b>(2). The process keyring is destroyed when the last thread that refers to it terminates.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If a process doesn\u2019t have a process keyring when it is accessed, then the process keyring will be created if the keyring is to be modified; otherwise, the error <b>ENOKEY<\/b> results.<\/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>session\u2212keyring<\/b>(7), <b>thread\u2212keyring<\/b>(7), <b>user\u2212keyring<\/b>(7), <b>user\u2212session\u2212keyring<\/b>(7)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  process-keyring \u2212 per-process shared keyring <\/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,972,1211],"class_list":["post-4132","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-man7","tag-process-keyring"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4132","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=4132"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4132\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}