152 lines
4.4 KiB
HTML
152 lines
4.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of USER-KEYRING</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>USER-KEYRING</H1>
|
|
Section: Linux Programmer's Manual (7)<BR>Updated: 2017-03-13<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
user-keyring - per-user keyring
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The user keyring is a keyring used to anchor keys on behalf of a user.
|
|
Each UID the kernel deals with has its own user keyring that
|
|
is shared by all processes with that UID.
|
|
The user keyring has a name (description) of the form
|
|
<I>_uid.<UID></I>
|
|
|
|
where
|
|
<I><UID></I>
|
|
|
|
is the user ID of the corresponding user.
|
|
<P>
|
|
|
|
The user keyring is associated with the record that the kernel maintains
|
|
for the UID.
|
|
It comes into existence upon the first attempt to access either the
|
|
user keyring, the
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user-session-keyring">user-session-keyring</A></B>(7),
|
|
|
|
or the
|
|
<B><A HREF="/cgi-bin/man/man2html?7+session-keyring">session-keyring</A></B>(7).
|
|
|
|
The keyring remains pinned in existence so long as there are processes
|
|
running with that real UID or files opened by those processes remain open.
|
|
(The keyring can also be pinned indefinitely by linking it
|
|
into another keyring.)
|
|
<P>
|
|
|
|
Typically, the user keyring is created by
|
|
<B><A HREF="/cgi-bin/man/man2html?8+pam_keyinit">pam_keyinit</A></B>(8)
|
|
|
|
when a user logs in.
|
|
<P>
|
|
|
|
The user keyring is not searched by default by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+request_key">request_key</A></B>(2).
|
|
|
|
When
|
|
<B><A HREF="/cgi-bin/man/man2html?8+pam_keyinit">pam_keyinit</A></B>(8)
|
|
|
|
creates a session keyring, it adds to it a link to the user
|
|
keyring so that the user keyring will be searched when the session keyring is.
|
|
<P>
|
|
|
|
A special serial number value,
|
|
<B>KEY_SPEC_USER_KEYRING</B>,
|
|
|
|
is defined that can be used in lieu of the actual serial number of
|
|
the calling process's user keyring.
|
|
<P>
|
|
|
|
From the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+keyctl">keyctl</A></B>(1)
|
|
|
|
utility, '<B>@u</B>' can be used instead of a numeric key ID in
|
|
much the same way.
|
|
<P>
|
|
|
|
User keyrings are independent of
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fork">fork</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+vfork">vfork</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+_exit">_exit</A></B>(2)
|
|
|
|
excepting that the keyring is destroyed when the UID record is destroyed when
|
|
the last process pinning it exits.
|
|
<P>
|
|
|
|
If it is necessary for a key associated with a user to exist beyond the UID
|
|
record being garbage collected---for example, for use by a
|
|
<B><A HREF="/cgi-bin/man/man2html?8+cron">cron</A></B>(8)
|
|
|
|
script---then the
|
|
<B><A HREF="/cgi-bin/man/man2html?7+persistent-keyring">persistent-keyring</A></B>(7)
|
|
|
|
should be used instead.
|
|
<P>
|
|
|
|
If a user keyring does not exist when it is accessed, it will be created.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+keyctl">keyctl</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+keyctl">keyctl</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+keyrings">keyrings</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+persistent-keyring">persistent-keyring</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+process-keyring">process-keyring</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+session-keyring">session-keyring</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+thread-keyring">thread-keyring</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user-session-keyring">user-session-keyring</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+pam_keyinit">pam_keyinit</A></B>(8)
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 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
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">SEE ALSO</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:10 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|