1KEYCTL_JOIN_SESSION_KEYRINGL(i3n)ux Key Management CaKlElYsCTL_JOIN_SESSION_KEYRING(3)
2
3
4

NAME

6       keyctl_join_session_keyring - Join a different session keyring
7

SYNOPSIS

9       #include <keyutils.h>
10
11       key_serial_t keyctl_join_session_keyring(const char *name);
12

DESCRIPTION

14       keyctl_join_session_keyring()  changes  the  session keyring to which a
15       process is subscribed.
16
17       If name is NULL then a new anonymous keyring will be created,  and  the
18       process will be subscribed to that.
19
20       If  name  points  to a string, then if a keyring of that name is avail‐
21       able, the process will attempt to subscribe to that keyring, giving  an
22       error if that is not permitted; otherwise a new keyring of that name is
23       created and attached as the session keyring.
24
25       To attach to an extant named keyring, the keyring must have search per‐
26       mission available to the calling process.
27

RETURN VALUE

29       On  success  keyctl_join_session_keyring() returns the serial number of
30       the key it found or created.  On error, the value -1 will  be  returned
31       and errno will have been set to an appropriate error.
32

ERRORS

34       ENOMEM Insufficient memory to create a key.
35
36       EDQUOT The  key  quota for this user would be exceeded by creating this
37              key or linking it to the keyring.
38
39       EACCES The named keyring exists, but is not searchable by  the  calling
40              process.
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),
48       add_key(2),
49       keyctl(2),
50       request_key(2),
51       keyctl(3),
52       request-key(8)
53
54
55
56Linux                             4 May 2006    KEYCTL_JOIN_SESSION_KEYRING(3)
Impressum