diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/key-type.h | 11 | ||||
| -rw-r--r-- | include/linux/key.h | 1 | ||||
| -rw-r--r-- | include/linux/keyctl.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/key-type.h b/include/linux/key-type.h index fc8525e838b7..9efd081bb31e 100644 --- a/include/linux/key-type.h +++ b/include/linux/key-type.h | |||
| @@ -105,11 +105,20 @@ extern int key_instantiate_and_link(struct key *key, | |||
| 105 | size_t datalen, | 105 | size_t datalen, |
| 106 | struct key *keyring, | 106 | struct key *keyring, |
| 107 | struct key *instkey); | 107 | struct key *instkey); |
| 108 | extern int key_negate_and_link(struct key *key, | 108 | extern int key_reject_and_link(struct key *key, |
| 109 | unsigned timeout, | 109 | unsigned timeout, |
| 110 | unsigned error, | ||
| 110 | struct key *keyring, | 111 | struct key *keyring, |
| 111 | struct key *instkey); | 112 | struct key *instkey); |
| 112 | extern void complete_request_key(struct key_construction *cons, int error); | 113 | extern void complete_request_key(struct key_construction *cons, int error); |
| 113 | 114 | ||
| 115 | static inline int key_negate_and_link(struct key *key, | ||
| 116 | unsigned timeout, | ||
| 117 | struct key *keyring, | ||
| 118 | struct key *instkey) | ||
| 119 | { | ||
| 120 | return key_reject_and_link(key, timeout, ENOKEY, keyring, instkey); | ||
| 121 | } | ||
| 122 | |||
| 114 | #endif /* CONFIG_KEYS */ | 123 | #endif /* CONFIG_KEYS */ |
| 115 | #endif /* _LINUX_KEY_TYPE_H */ | 124 | #endif /* _LINUX_KEY_TYPE_H */ |
diff --git a/include/linux/key.h b/include/linux/key.h index a6b1edcffc34..b2bb01719561 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -170,6 +170,7 @@ struct key { | |||
| 170 | struct list_head link; | 170 | struct list_head link; |
| 171 | unsigned long x[2]; | 171 | unsigned long x[2]; |
| 172 | void *p[2]; | 172 | void *p[2]; |
| 173 | int reject_error; | ||
| 173 | } type_data; | 174 | } type_data; |
| 174 | 175 | ||
| 175 | /* key data | 176 | /* key data |
diff --git a/include/linux/keyctl.h b/include/linux/keyctl.h index bd383f1944fb..7022974def0c 100644 --- a/include/linux/keyctl.h +++ b/include/linux/keyctl.h | |||
| @@ -53,5 +53,6 @@ | |||
| 53 | #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ | 53 | #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ |
| 54 | #define KEYCTL_GET_SECURITY 17 /* get key security label */ | 54 | #define KEYCTL_GET_SECURITY 17 /* get key security label */ |
| 55 | #define KEYCTL_SESSION_TO_PARENT 18 /* apply session keyring to parent process */ | 55 | #define KEYCTL_SESSION_TO_PARENT 18 /* apply session keyring to parent process */ |
| 56 | #define KEYCTL_REJECT 19 /* reject a partially constructed key */ | ||
| 56 | 57 | ||
| 57 | #endif /* _LINUX_KEYCTL_H */ | 58 | #endif /* _LINUX_KEYCTL_H */ |
