1KEYCTL_SET_REQKEY_KEYRING(3L)inux Key Management CallKsEYCTL_SET_REQKEY_KEYRING(3)
2
3
4

NAME

6       keyctl_set_reqkey_keyring - Set the implicit destination keyring
7

SYNOPSIS

9       #include <keyutils.h>
10
11       long keyctl_set_reqkey_keyring(int reqkey_defl);
12

DESCRIPTION

14       keyctl_set_reqkey_keyring()  sets  the default destination for implicit
15       key requests for the current thread and returns the old setting.
16
17       After this operation has been issued, keys  acquired  by  implicit  key
18       requests,  such  as  might  be  performed  by  open()  on an AFS or NFS
19       filesystem, will be linked by default to the specified keyring by  this
20       function.
21
22       The valid values of reqkey_defl are:
23
24       KEY_REQKEY_DEFL_NO_CHANGE
25              This makes no change to the current setting.
26
27       KEY_REQKEY_DEFL_THREAD_KEYRING
28              This makes the thread-specific keyring the default destination.
29
30       KEY_REQKEY_DEFL_PROCESS_KEYRING
31              This makes the process-specific keyring the default destination.
32
33       KEY_REQKEY_DEFL_SESSION_KEYRING
34              This makes the session keyring the default destination.
35
36       KEY_REQKEY_DEFL_USER_KEYRING
37              This makes the UID-specific keyring the default destination.
38
39       KEY_REQKEY_DEFL_USER_SESSION_KEYRING
40              This makes the UID-specific session keyring the default destina‐
41              tion.
42
43       KEY_REQKEY_DEFL_DEFAULT
44              This selects the default behaviour which is to use  the  thread-
45              specific keyring if there is one, otherwise the process-specific
46              keyring if there is one, otherwise the session keyring if  there
47              is one, otherwise the UID-specific session keyring.
48
49       This setting is inherited across fork() and exec().
50
51

RETURN VALUE

53       On  success keyctl_set_reqkey_keyring() returns 0.  On error, the value
54       -1 will be returned and errno will have  been  set  to  an  appropriate
55       error.
56

ERRORS

58       EINVAL The value of reqkey_defl is invalid.
59

LINKING

61       This  is  a  library  function  that can be found in libkeyutils.  When
62       linking, -lkeyutils should be specified to the linker.
63

SEE ALSO

65       keyctl(1),
66       add_key(2),
67       keyctl(2),
68       request_key(2),
69       keyctl_get_keyring_ID(3),
70       keyctl_join_session_keyring(3),
71       keyctl_update(3),
72       keyctl_revoke(3),
73       keyctl_chown(3),
74       keyctl_setperm(3),
75       keyctl_describe(3),
76       keyctl_clear(3),
77       keyctl_link(3),
78       keyctl_unlink(3),
79       keyctl_search(3),
80       keyctl_read(3),
81       keyctl_instantiate(3),
82       keyctl_negate(3),
83       keyctl_set_timeout(3),
84       keyctl_assume_authority(3),
85       keyctl_describe_alloc(3),
86       keyctl_read_alloc(3),
87       request-key(8)
88
89
90
91Linux                             4 May 2006      KEYCTL_SET_REQKEY_KEYRING(3)
Impressum