man-pages/man7/keyutils.7.html
2021-03-31 01:06:50 +01:00

178 lines
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of KEYUTILS</TITLE>
</HEAD><BODY>
<H1>KEYUTILS</H1>
Section: Kernel key management (7)<BR>Updated: 21 Feb 2014<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
keyutils - in-kernel key management utilities
<A NAME="lbAC">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>keyutils</B>
package is a library and a set of utilities for accessing the kernel
<B>keyrings</B> facility.
<P>
A header file is supplied to provide the definitions and declarations required
to access the library:
<P>
<DL COMPACT><DT id="1"><DD>
<B>#include &lt;<A HREF="file:///usr/include/keyutils.h">keyutils.h</A>&gt;</B>
</DL>
<P>
To link with the library, the following:
<P>
<DL COMPACT><DT id="2"><DD>
<B>-lkeyutils</B>
</DL>
<P>
should be specified to the linker.
<P>
Three system calls are provided:
<DL COMPACT>
<DT id="3"><B><A HREF="/cgi-bin/man/man2html?2+add_key">add_key</A></B>(2)
<DD>
Supply a new key to the kernel.
<DT id="4"><B><A HREF="/cgi-bin/man/man2html?2+request_key">request_key</A></B>(2)
<DD>
Find an existing key for use, or, optionally, create one if one does not exist.
<DT id="5"><B><A HREF="/cgi-bin/man/man2html?2+keyctl">keyctl</A></B>(2)
<DD>
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.
</DL>
<P>
See the
<B><A HREF="/cgi-bin/man/man2html?2+add_key">add_key</A></B>(2),
<B><A HREF="/cgi-bin/man/man2html?2+request_key">request_key</A></B>(2),
and
<B><A HREF="/cgi-bin/man/man2html?2+keyctl">keyctl</A></B>(2)
manual pages for more information.
<P>
The <B>keyctl</B>() wrappers are listed on the
<B><A HREF="/cgi-bin/man/man2html?3+keyctl">keyctl</A></B>(3)
manual page.
<A NAME="lbAD">&nbsp;</A>
<H2>UTILITIES</H2>
<P>
A program is provided to interact with the kernel facility by a number of
subcommands, e.g.:
<P>
<DL COMPACT><DT id="6"><DD>
<B>keyctl add user foo bar @s</B>
</DL>
<P>
See the
<B><A HREF="/cgi-bin/man/man2html?1+keyctl">keyctl</A></B>(1)
manual page for information on that.
<P>
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>
The upcalling mechanism is usually routed via the
<B><A HREF="/cgi-bin/man/man2html?8+request-key">request-key</A></B>(8)
program. What this does with any particular key is configurable in:
<P>
<DL COMPACT><DT id="7"><DD>
<I>/etc/request-key.conf</I>
<BR>
<I>/etc/request-key.d/</I>
</DL>
<P>
See the
<B><A HREF="/cgi-bin/man/man2html?5+request-key.conf">request-key.conf</A></B>(5)
and the
<B><A HREF="/cgi-bin/man/man2html?8+request-key">request-key</A></B>(8)
manual pages for more information.
<A NAME="lbAE">&nbsp;</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-keyring">user-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)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
<DT id="9"><A HREF="#lbAC">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAD">UTILITIES</A><DD>
<DT id="11"><A HREF="#lbAE">SEE ALSO</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:09 GMT, March 31, 2021
</BODY>
</HTML>