1KEYCTL_JOIN_SESSION_KEYRINGL(i3n)ux Key Management CaKlElYsCTL_JOIN_SESSION_KEYRING(3)
2
3
4
6 keyctl_join_session_keyring - Join a different session keyring
7
9 #include <keyutils.h>
10
11 key_serial_t keyctl_join_session_keyring(const char *name);
12
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
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
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
43 This is a library function that can be found in libkeyutils. When
44 linking, -lkeyutils should be specified to the linker.
45
47 keyctl(1),
48 add_key(2),
49 keyctl(2),
50 request_key(2),
51 keyctl_get_keyring_ID(3),
52 keyctl_update(3),
53 keyctl_revoke(3),
54 keyctl_chown(3),
55 keyctl_setperm(3),
56 keyctl_describe(3),
57 keyctl_clear(3),
58 keyctl_link(3),
59 keyctl_unlink(3),
60 keyctl_search(3),
61 keyctl_read(3),
62 keyctl_instantiate(3),
63 keyctl_negate(3),
64 keyctl_set_reqkey_keyring(3),
65 keyctl_set_timeout(3),
66 keyctl_assume_authority(3),
67 keyctl_describe_alloc(3),
68 keyctl_read_alloc(3),
69 request-key(8)
70
71
72
73Linux 4 May 2006 KEYCTL_JOIN_SESSION_KEYRING(3)