# keyutils(7) - man - phpman

[KEYUTILS(7)](https://www.chedong.com/phpMan.php/man/KEYUTILS/7/markdown)                             Kernel key management                            [KEYUTILS(7)](https://www.chedong.com/phpMan.php/man/KEYUTILS/7/markdown)



## NAME
       keyutils - in-kernel key management utilities

## DESCRIPTION
       The  **keyutils**  package  is a library and a set of utilities for accessing the kernel **keyrings**
       facility.

       A header file is supplied to provide the definitions and declarations required to access  the
       library:

              **#include** **<keyutils.h>**

       To link with the library, the following:

              **-lkeyutils**

       should be specified to the linker.

       Three system calls are provided:

       **add**___**[key**(2)](https://www.chedong.com/phpMan.php/man/key/2/markdown)
              Supply a new key to the kernel.

       **request**___**[key**(2)](https://www.chedong.com/phpMan.php/man/key/2/markdown)
              Find an existing key for use, or, optionally, create one if one does not exist.

       [**keyctl**(2)](https://www.chedong.com/phpMan.php/man/keyctl/2/markdown)
              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.

       See the **add**___**[key**(2)](https://www.chedong.com/phpMan.php/man/key/2/markdown), **request**___**[key**(2)](https://www.chedong.com/phpMan.php/man/key/2/markdown), and [**keyctl**(2)](https://www.chedong.com/phpMan.php/man/keyctl/2/markdown) manual pages for more information.

       The **keyctl**() wrappers are listed on the [**keyctl**(3)](https://www.chedong.com/phpMan.php/man/keyctl/3/markdown) manual page.

## UTILITIES
       A program is provided to interact with the kernel facility by a number of subcommands, e.g.:

              **keyctl** **add** **user** **foo** **bar** **@s**

       See the [**keyctl**(1)](https://www.chedong.com/phpMan.php/man/keyctl/1/markdown) manual page for information on that.

       The kernel has the ability to upcall to userspace to fabricate new keys.  This can  be  trig‐
       gered  by  **request**___**key**(),  but userspace is better off using **add**___**key**() instead if it possibly
       can.

       The upcalling mechanism is usually routed via the [**request-key**(8)](https://www.chedong.com/phpMan.php/man/request-key/8/markdown)  program.   What  this  does
       with any particular key is configurable in:

              _/etc/request-key.conf_
              _/etc/request-key.d/_

       See the [**request-key.conf**(5)](https://www.chedong.com/phpMan.php/man/request-key.conf/5/markdown) and the [**request-key**(8)](https://www.chedong.com/phpMan.php/man/request-key/8/markdown) manual pages for more information.

## SEE ALSO
       [**keyctl**(1)](https://www.chedong.com/phpMan.php/man/keyctl/1/markdown), [**keyctl**(3)](https://www.chedong.com/phpMan.php/man/keyctl/3/markdown), [**keyrings**(7)](https://www.chedong.com/phpMan.php/man/keyrings/7/markdown), [**persistent-keyring**(7)](https://www.chedong.com/phpMan.php/man/persistent-keyring/7/markdown), [**process-keyring**(7)](https://www.chedong.com/phpMan.php/man/process-keyring/7/markdown),
       [**session-keyring**(7)](https://www.chedong.com/phpMan.php/man/session-keyring/7/markdown), [**thread-keyring**(7)](https://www.chedong.com/phpMan.php/man/thread-keyring/7/markdown), [**user-keyring**(7)](https://www.chedong.com/phpMan.php/man/user-keyring/7/markdown), [**user-session-keyring**(7)](https://www.chedong.com/phpMan.php/man/user-session-keyring/7/markdown),
       **pam**___**[keyinit**(8)](https://www.chedong.com/phpMan.php/man/keyinit/8/markdown)



Linux                                        21 Feb 2014                                 [KEYUTILS(7)](https://www.chedong.com/phpMan.php/man/KEYUTILS/7/markdown)
