linux命令后面加ctl,Unix_Linux

Unix_Linux 的 keyctl

keyctl -操作内核的密钥管理工具

内容简介

#include

long keyctl(intcmd, ...);

描述

keyctl()有许多功能可用:

标签

描述

KEYCTL_GET_KEYRING_ID

Ask for a keyring’s ID.

KEYCTL_JOIN_SESSION_KEYRING

Join or start named session keyring.

KEYCTL_UPDATE

Update a key.

KEYCTL_REVOKE

Revoke a key.

KEYCTL_CHOWN

Set ownership of a key.

KEYCTL_SETPERM

Set perms on a key.

KEYCTL_DESCRIBE

Describe a key.

KEYCTL_CLEAR

Clear contents of a keyring.

KEYCTL_LINK

Link a key into a keyring.

KEYCTL_UNLINK

Unlink a key from a keyring.

KEYCTL_SEARCH

Search for a key in a keyring.

KEYCTL_READ

Read a key or keyring’s contents.

KEYCTL_INSTANTIATE

Instantiate a partially constructed key.

KEYCTL_NEGATE

Negate a partially constructed key.

KEYCTL_SET_REQKEY_KEYRING

Set default request-key keyring.

KEYCTL_SET_TIMEOUT

Set timeout on a key.

KEYCTL_ASSUME_AUTHORITY

Assume authority to instantiate key.

These are wrapped bylibkeyutilsinto individual functions to permit compiler the compiler to check types. See thesection at the bottom.

返回值

On successkeyctl() returns the serial number of the key it found. On error, the value-1will be returned and errno will have been set to an appropriate error.

错误

标签

描述

ENOKEY

No matching key was found or an invalid key was specified.

EKEYEXPIRED

An expired key was found or specified.

EKEYREVOKED

A revoked key was found or specified.

EKEYREJECTED

A rejected key was found or specified.

EDQUOT

The key quota for the caller’s user would be exceeded by creating a key or linking it to the keyring.

EACCES

A key operation wasn’t permitted.

LINKING

Although this is a Linux system call, it is not present inlibcbut can be found rather inlibkeyutils. When linking,-lkeyutilsshould be specified to the linker.

另请参阅

add_key(2), request_key(2), keyctl_get_keyring_ID(3), keyctl_join_session_keyring(3), keyctl_update(3), keyctl_revoke(3), keyctl_chown(3), keyctl_setperm(3), keyctl_describe(3), keyctl_clear(3), keyctl_link(3), keyctl_unlink(3), keyctl_search(3), keyctl_read(3), keyctl_instantiate(3), keyctl_negate(3), keyctl_set_reqkey_keyring(3), keyctl_set_timeout(3), keyctl_assume_authority(3), keyctl_describe_alloc(3), keyctl_read_alloc(3), request-key(8)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值