1KEYCTL_RESTRICT_KEYRING(3)Linux Key Management CallsKEYCTL_RESTRICT_KEYRING(3)
2
3
4

NAME

6       keyctl_restrict_keyring - restrict keys that may be linked to a keyring
7

SYNOPSIS

9       #include <keyutils.h>
10
11       long keyctl_restrict_keyring(key_serial_t keyring,
12       const char *type, const char *restriction);
13

DESCRIPTION

15       keyctl_restrict_keyring()  limits  the  linkage  of  keys  to the given
16       keyring using a provided key type and restriction scheme. The available
17       options  vary  depending  on  the  key  type,  and  typically contain a
18       restriction name possibly followed by key ids or other data relevant to
19       the restriction. If the type and restriction are both NULL, the keyring
20       will reject all links.
21

RETURN VALUE

23       On success keyctl_restrict_keyring() returns 0.  On error, the value -1
24       will be returned and errno will have been set to an appropriate error.
25

ERRORS

27       EDEADLK
28              A  restriction  cycle  was avoided. Two keyrings cannot restrict
29              each other.
30
31       EEXIST The keyring is already restricted.
32
33       EINVAL The restriction string is invalid or too large.
34
35       ENOKEY The key type in the restriction is invalid or not available.
36
37       ENOTDIR
38              The provided key id references an item that is not a keyring.
39
40       ENOENT The key type exists but does not support restrictions.
41

LINKING

43       This is a library function that can  be  found  in  libkeyutils.   When
44       linking, -lkeyutils should be specified to the linker.
45

SEE ALSO

47       keyctl(1), keyctl(2), keyctl(3), keyutils(7)
48
49
50
51Linux                             28 Feb 2017       KEYCTL_RESTRICT_KEYRING(3)
Impressum