1KEYCTL_SESSION_TO_PARENT(3)Linux Key Management CallsKEYCTL_SESSION_TO_PARENT(3)
2
3
4

NAME

6       keyctl_session_to_parent - set the parent process's session keyring
7

SYNOPSIS

9       #include <keyutils.h>
10
11       long keyctl_session_to_parent();
12

DESCRIPTION

14       keyctl_session_to_parent()  changes  the  session  keyring to which the
15       calling process's parent subscribes to  be  the  that  of  the  calling
16       process.
17
18       The keyring must have link permission available to the calling process,
19       the parent process must have the same UIDs/GIDs as the calling process,
20       and the LSM must not reject the replacement.  Furthermore, this may not
21       be used to affect init or a kernel thread.
22
23       Note that the replacement will not take immediate effect upon the  par‐
24       ent process, but will rather be deferred to the next time it returns to
25       userspace from kernel space.
26

RETURN VALUE

28       On success keyctl_session_to_parent() returns 0.  On error,  the  value
29       -1  will  be  returned  and  errno will have been set to an appropriate
30       error.
31

ERRORS

33       ENOMEM Insufficient memory to create a key.
34
35       EPERM  The credentials of the parent don't match those of the caller.
36
37       EACCES The named keyring exists, but is not  linkable  by  the  calling
38              process.
39

LINKING

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

SEE ALSO

45       keyctl(1), add_key(2), keyctl(2), request_key(2), keyctl(3),
46       keyrings(7), keyutils(7), session-keyring(7), user-session-keyring(7)
47
48
49
50Linux                             20 Feb 2014      KEYCTL_SESSION_TO_PARENT(3)
Impressum