KEYCTL_LINK


HOME

KEYCTL_LINK

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
LINKING
SEE ALSO

NAME

keyctl_link − Link a key to a keyring keyctl_unlink − Unlink a key from a keyring

SYNOPSIS

#include <keyutils.h>

long keyctl_link(key_serial_t key, key_serial_t keyring);

long keyctl_unlink(key_serial_t key, key_serial_t keyring);

DESCRIPTION

keyctl_link() creates a link from keyring to key, displacing any link to another key of the same type and description in that keyring if one exists.

keyctl_unlink() removes the link from keyring to key if it exists.

The caller must have write permission on a keyring to be able create or remove links in it.

The caller must have link permission on a key to be able to create a link to it.

RETURN VALUE

On success keyctl_link() and keyctl_unlink() return 0. On error, the value -1 will be returned and errno will have been set to an appropriate error.

ERRORS

ENOKEY

The key or the keyring specified are invalid.

EKEYEXPIRED

The key or the keyring specified have expired.

EKEYREVOKED

The key or the keyring specified have been revoked.

EACCES

The keyring exists, but is not writable by the calling process.

For keyctl_link() only:

ENOMEM

Insufficient memory to expand the keyring

EDQUOT

Expanding the keyring would exceed the keyring owner’s quota.

EACCES

The key exists, but is not linkable by the calling 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),
keyutils
(7),
keyrings
(7)




More Linux Commands

manpages/sane-microtek2.5.html
sane-microtek2(5) - SANE backend for Microtek scanners with
The sane-microtek2 library implements a SANE (Scanner Access Now Easy) backend that provides access to Microtek scanners with a SCSI-2 command set. This backend

manpages/glGetPolygonStipple.3gl.html
glGetPolygonStipple(3gl) - return the polygon stipple patter
glGetPolygonStipple returns to mask a $32 ~times~ 32$ polygon stipple pattern. The pattern is packed into memory as if glReadPixels with both height and width o

manpages/xgettext.1.html
xgettext(1) - extract gettext strings from source (ManPage)
Extract translatable strings from given input files. Mandatory arguments to long options are mandatory for short options too. Similarly for optional arguments.

manpages/numfnames.3ncurses.html
numfnames(3ncurses) - curses terminfo global variables......
This page summarizes variables provided by the curses librarys low-level terminfo interface. A more complete description is given in the curs_terminfo(3X) manua

manpages/nepomukserver.8.html
nepomukserver(8) - KDE daemon - The Nepomuk server applicati
nepomukserver starts the Nepomuk server which manages all Nepomuk services and provides a DBus API. It uses nepomukservicestub to run all configured Nepomuk ser

manpages/strsep.3.html
strsep(3) - extract token from string - Linux manual page...
If *stringp is NULL, the strsep() function returns NULL and does nothing else. Otherwise, this function finds the first token in the string *stringp, that is de

manpages/keyok.3ncurses.html
keyok(3ncurses) - enable or disable a keycode (Man Page)....
This is an extension to the curses library. It permits an application to disable specific keycodes, rather than use the keypad function to disable all keycodes.

manpages/ssl.3ssl.html
ssl(3ssl) - OpenSSL SSL/TLS library - Linux manual page.....
The OpenSSL ssl library implements the Secure Sockets Layer ( SSL v2/v3) and Transport Layer Security ( TLS v1) protocols. It provides a rich API which is docum

manpages/libauth.3.html
libauth(3) - routines for writing nnrpd resolvers and authen
These functions provide a convenient C frontend to the nnrpd external authentication interface documented in doc/external-auth. Use of this library is not requi

manpages/cut.1.html
cut(1) - remove sections from each line of files (Man Page)
Print selected parts of lines from each FILE to standard output. Mandatory arguments to long options are mandatory for short options too. -b, --bytes=LIST selec

manpages/aa-genprof.8.html
aa-genprof(8) profile generation utility for AppArmor.......
When running aa-genprof, you must specify a program to profile. If the specified program is not a fully-qualified path, aa-genprof will search $PATH in order to

manpages/unctrl.3ncurses.html
unctrl(3ncurses) - miscellaneous curses utility routines....
The unctrl routine returns a character string which is a printable representation of the character c, ignoring attributes. Control characters are displayed in t





We can't live, work or learn in freedom unless the software we use is free.