Struct keyutils::Key [] [src]

pub struct Key { /* fields omitted */ }

Methods

impl Key
[src]

Representation of a kernel key.

Requests a key with the given description by searching the thread, process, and session keyrings.

Requests a key with the given description by searching the thread, process, and session keyrings.

Requests a key with the given description by searching the thread, process, and session keyrings. If it is not found, the info string will be handed off to /sbin/request-key to generate the key.

Update the payload in the key.

Revokes the key. Requires write permission on the key.

Change the user which owns the key. Requires the setattr permission on the key and the SysAdmin capability to change it to anything other than the current user.

Change the group which owns the key. Requires the setattr permission on the key and the SysAdmin capability to change it to anything other than a group of which the current user is a member.

Set the permissions on the key. Requires the setattr permission on the key and the SysAdmin capability if the current user does not own the key.

Retrieve metadata about the key.

Panics

If the kernel returns malformed data, the the parser will panic.

Read the payload of the key. Requires read permissions on the key.

Set an expiration timer on the key to timeout seconds in the future. A timeout of 0 means "no expiration". Requires the setattr permission on the key.

The security context of the key. Depends on the security manager loaded into the kernel (e.g., SELinux or AppArmor).

Invalidates the key and schedules it for removal. Requires the search permission on the key.

Create an object to manage a key request.