Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   keyctl    ( 2 )

манипулировать средствами управления ключами ядра (manipulate the kernel's key management facility)

  Name  |  Synopsis  |  Description  |    Return value    |  Error  |  Versions  |  Conforming to  |  Note  |  Examples  |  See also  |

Возвращаемое значение (Return value)

For a successful call, the return value depends on the operation:

KEYCTL_GET_KEYRING_ID The ID of the requested keyring.

KEYCTL_JOIN_SESSION_KEYRING The ID of the joined session keyring.

KEYCTL_DESCRIBE The size of the description (including the terminating null byte), irrespective of the provided buffer size.

KEYCTL_SEARCH The ID of the key that was found.

KEYCTL_READ The amount of data that is available in the key, irrespective of the provided buffer size.

KEYCTL_SET_REQKEY_KEYRING The ID of the previous default keyring to which implicitly requested keys were linked (one of KEY_REQKEY_DEFL_USER_*).

KEYCTL_ASSUME_AUTHORITY Either 0, if the ID given was 0, or the ID of the authorization key matching the specified key, if a nonzero key ID was provided.

KEYCTL_GET_SECURITY The size of the LSM security label string (including the terminating null byte), irrespective of the provided buffer size.

KEYCTL_GET_PERSISTENT The ID of the persistent keyring.

KEYCTL_DH_COMPUTE The number of bytes copied to the buffer, or, if arg4 is 0, the required buffer size.

All other operations Zero.

On error, -1 is returned, and errno is set to indicate the error.