keyctl_get_persistent man page on Archlinux

Man page or keyword search:  
man Server   11224 pages
apropos Keyword Search (all sections)
Output format
Archlinux logo
[printable version]

KEYCTL_GET_PERSISTENT(3)  Linux Key Management Calls  KEYCTL_GET_PERSISTENT(3)

NAME
       keyctl_get_persistent - Get the persistent keyring for a user

SYNOPSIS
       #include <keyutils.h>

       long keyctl_get_persistent(uid_t uid, key_serial_t keyring);

DESCRIPTION
       keyctl_get_persistent()	gets  the persistent keyring for the specified
       user ID.	 Unlike the session and user keyrings, this keyring will  per‐
       sist  once all login sessions have been deleted and can thus be used to
       carry authentication tokens for processes that run without user	inter‐
       action, such as programs started by cron.

       The persistent keyring will be created by the kernel if it does not yet
       exist.  Each time this function is called, the persistent keyring  will
       have its expiration timeout reset to the value in:

	      /proc/sys/kernel/keys/persistent_keyring_expiry

       (by default three days).	 Should the timeout be reached, the persistent
       keyring will be removed and everything it pins can then be garbage col‐
       lected.

       If  uid is -1 then the calling process's real user ID will be used.  If
       uid is not -1 then error EPERM will be given if the user	 ID  requested
       does not match either the caller's real or effective user IDs or if the
       calling process does not have SetUid capability.

       If successful, a link to the persistent	keyring	 will  be  added  into
       keyring.

RETURN VALUE
       On  success  keyctl_get_persistent()  returns  the serial number of the
       persistent keyring.  On error, the value -1 will be returned and	 errno
       will have been set to an appropriate error.

ERRORS
       EPERM  Not permitted to access the persistent keyring for the requested
	      uid.

       ENOMEM Insufficient memory to  create  the  persistent  keyring	or  to
	      extend keyring.

       ENOKEY keyring does not exist.

       EKEYEXPIRED
	      keyring has expired.

       EKEYREVOKED
	      keyring has been revoked.

       EDQUOT The user does not have sufficient quota to extend keyring.

       EACCES keyring exists, but does not grant write permission to the call‐
	      ing process.

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

SEE ALSO
       keyctl(1),
       add_key(2),
       keyctl(2),
       request_key(2),
       keyctl(3),
       persistent-keyring(7),
       keyutils(7),
       keyrings(7)

Linux				  20 Feb 2014	      KEYCTL_GET_PERSISTENT(3)
[top]

List of man pages available for Archlinux

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net