Enum procfs::keyring::KeyType [−][src]
pub enum KeyType {
User,
Keyring,
Logon,
BigKey,
Other(String),
}
Variants
This is a general-purpose key type.
The key is kept entirely within kernel memory. The payload may be read and updated by user-space applications. The payload for keys of this type is a blob of arbitrary data of up to 32,767 bytes. The description may be any valid string, though it is preferred that it start with a colon-delimited prefix representing the service to which the key is of interest (for instance “afs:mykey”).
Keyrings are special keys which store a set of links to other keys (including other keyrings), analogous to a directory holding links to files. The main purpose of a keyring is to prevent other keys from being garbage collected because nothing refers to them.
Keyrings with descriptions (names) that begin with a period (‘.’) are re‐ served to the implementation.
This key type is essentially the same as “user”, but it does not provide reading (i.e., the keyctl(2) KEYCTL_READ operation), meaning that the key payload is never visible from user space. This is suitable for storing user‐ name-password pairs that should not be readable from user space.
The description of a “logon” key must start with a non-empty colon-delimited prefix whose purpose is to identify the service to which the key belongs. (Note that this differs from keys of the “user” type, where the inclusion of a prefix is recommended but is not enforced.)
This key type is similar to the “user” key type, but it may hold a payload of up to 1 MiB in size. This key type is useful for purposes such as holding Kerberos ticket caches.
The payload data may be stored in a tmpfs filesystem, rather than in kernel memory, if the data size exceeds the overhead of storing the data in the filesystem. (Storing the data in a filesystem requires filesystem structures to be allocated in the kernel. The size of these structures determines the size threshold above which the tmpfs storage method is used.) Since Linux 4.8, the payload data is encrypted when stored in tmpfs, thereby preventing it from being written unencrypted into swap space.
Other specialized, but rare keys types
Tuple Fields of Other
0: String
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KeyType
impl UnwindSafe for KeyType
Blanket Implementations
Mutably borrows from an owned value. Read more