-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Move keyctl to new/linux_uapi #4725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
neuschaefer
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
neuschaefer:keyctl
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+72
−80
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
//! Header: `uapi/linux/keyctl.h` | ||
|
||
// linux/keyctl.h | ||
pub const KEY_SPEC_THREAD_KEYRING: i32 = -1; | ||
pub const KEY_SPEC_PROCESS_KEYRING: i32 = -2; | ||
pub const KEY_SPEC_SESSION_KEYRING: i32 = -3; | ||
pub const KEY_SPEC_USER_KEYRING: i32 = -4; | ||
pub const KEY_SPEC_USER_SESSION_KEYRING: i32 = -5; | ||
pub const KEY_SPEC_GROUP_KEYRING: i32 = -6; | ||
pub const KEY_SPEC_REQKEY_AUTH_KEY: i32 = -7; | ||
pub const KEY_SPEC_REQUESTOR_KEYRING: i32 = -8; | ||
|
||
pub const KEY_REQKEY_DEFL_NO_CHANGE: i32 = -1; | ||
pub const KEY_REQKEY_DEFL_DEFAULT: i32 = 0; | ||
pub const KEY_REQKEY_DEFL_THREAD_KEYRING: i32 = 1; | ||
pub const KEY_REQKEY_DEFL_PROCESS_KEYRING: i32 = 2; | ||
pub const KEY_REQKEY_DEFL_SESSION_KEYRING: i32 = 3; | ||
pub const KEY_REQKEY_DEFL_USER_KEYRING: i32 = 4; | ||
pub const KEY_REQKEY_DEFL_USER_SESSION_KEYRING: i32 = 5; | ||
pub const KEY_REQKEY_DEFL_GROUP_KEYRING: i32 = 6; | ||
pub const KEY_REQKEY_DEFL_REQUESTOR_KEYRING: i32 = 7; | ||
|
||
pub const KEYCTL_GET_KEYRING_ID: u32 = 0; | ||
pub const KEYCTL_JOIN_SESSION_KEYRING: u32 = 1; | ||
pub const KEYCTL_UPDATE: u32 = 2; | ||
pub const KEYCTL_REVOKE: u32 = 3; | ||
pub const KEYCTL_CHOWN: u32 = 4; | ||
pub const KEYCTL_SETPERM: u32 = 5; | ||
pub const KEYCTL_DESCRIBE: u32 = 6; | ||
pub const KEYCTL_CLEAR: u32 = 7; | ||
pub const KEYCTL_LINK: u32 = 8; | ||
pub const KEYCTL_UNLINK: u32 = 9; | ||
pub const KEYCTL_SEARCH: u32 = 10; | ||
pub const KEYCTL_READ: u32 = 11; | ||
pub const KEYCTL_INSTANTIATE: u32 = 12; | ||
pub const KEYCTL_NEGATE: u32 = 13; | ||
pub const KEYCTL_SET_REQKEY_KEYRING: u32 = 14; | ||
pub const KEYCTL_SET_TIMEOUT: u32 = 15; | ||
pub const KEYCTL_ASSUME_AUTHORITY: u32 = 16; | ||
pub const KEYCTL_GET_SECURITY: u32 = 17; | ||
pub const KEYCTL_SESSION_TO_PARENT: u32 = 18; | ||
pub const KEYCTL_REJECT: u32 = 19; | ||
pub const KEYCTL_INSTANTIATE_IOV: u32 = 20; | ||
pub const KEYCTL_INVALIDATE: u32 = 21; | ||
pub const KEYCTL_GET_PERSISTENT: u32 = 22; | ||
pub const KEYCTL_DH_COMPUTE: u32 = 23; | ||
pub const KEYCTL_PKEY_QUERY: u32 = 24; | ||
pub const KEYCTL_PKEY_ENCRYPT: u32 = 25; | ||
pub const KEYCTL_PKEY_DECRYPT: u32 = 26; | ||
pub const KEYCTL_PKEY_SIGN: u32 = 27; | ||
pub const KEYCTL_PKEY_VERIFY: u32 = 28; | ||
pub const KEYCTL_RESTRICT_KEYRING: u32 = 29; | ||
pub const KEYCTL_MOVE: u32 = 30; | ||
pub const KEYCTL_CAPABILITIES: u32 = 31; | ||
|
||
pub const KEYCTL_SUPPORTS_ENCRYPT: u32 = 0x01; | ||
pub const KEYCTL_SUPPORTS_DECRYPT: u32 = 0x02; | ||
pub const KEYCTL_SUPPORTS_SIGN: u32 = 0x04; | ||
pub const KEYCTL_SUPPORTS_VERIFY: u32 = 0x08; | ||
|
||
pub const KEYCTL_CAPS0_CAPABILITIES: u32 = 0x01; | ||
pub const KEYCTL_CAPS0_PERSISTENT_KEYRINGS: u32 = 0x02; | ||
pub const KEYCTL_CAPS0_DIFFIE_HELLMAN: u32 = 0x04; | ||
pub const KEYCTL_CAPS0_PUBLIC_KEY: u32 = 0x08; | ||
pub const KEYCTL_CAPS0_BIG_KEY: u32 = 0x10; | ||
pub const KEYCTL_CAPS0_INVALIDATE: u32 = 0x20; | ||
pub const KEYCTL_CAPS0_RESTRICT_KEYRING: u32 = 0x40; | ||
pub const KEYCTL_CAPS0_MOVE: u32 = 0x80; | ||
pub const KEYCTL_CAPS1_NS_KEYRING_NAME: u32 = 0x01; | ||
pub const KEYCTL_CAPS1_NS_KEY_TAG: u32 = 0x02; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
|
||
pub(crate) mod can; | ||
pub use can::*; | ||
pub(crate) mod keyctl; | ||
pub use keyctl::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why glibc and MIPS were special-cased here. In theory, that should not be necessary for constants defined in the Linux UAPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT this was wrong and it's good that it's being removed here