diff options
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index 83b603639d2e..722914798f37 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -173,10 +173,9 @@ struct key { | |||
173 | #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ | 173 | #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ |
174 | #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ | 174 | #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ |
175 | #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ | 175 | #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ |
176 | #define KEY_FLAG_TRUSTED 8 /* set if key is trusted */ | 176 | #define KEY_FLAG_BUILTIN 8 /* set if key is built in to the kernel */ |
177 | #define KEY_FLAG_BUILTIN 9 /* set if key is built in to the kernel */ | 177 | #define KEY_FLAG_ROOT_CAN_INVAL 9 /* set if key can be invalidated by root without permission */ |
178 | #define KEY_FLAG_ROOT_CAN_INVAL 10 /* set if key can be invalidated by root without permission */ | 178 | #define KEY_FLAG_KEEP 10 /* set if key should not be removed */ |
179 | #define KEY_FLAG_KEEP 11 /* set if key should not be removed */ | ||
180 | 179 | ||
181 | /* the key type and key description string | 180 | /* the key type and key description string |
182 | * - the desc is used to match a key against search criteria | 181 | * - the desc is used to match a key against search criteria |
@@ -217,7 +216,6 @@ struct key { | |||
217 | */ | 216 | */ |
218 | int (*restrict_link)(struct key *keyring, | 217 | int (*restrict_link)(struct key *keyring, |
219 | const struct key_type *type, | 218 | const struct key_type *type, |
220 | unsigned long flags, | ||
221 | const union key_payload *payload); | 219 | const union key_payload *payload); |
222 | }; | 220 | }; |
223 | 221 | ||
@@ -229,16 +227,14 @@ extern struct key *key_alloc(struct key_type *type, | |||
229 | unsigned long flags, | 227 | unsigned long flags, |
230 | int (*restrict_link)(struct key *, | 228 | int (*restrict_link)(struct key *, |
231 | const struct key_type *, | 229 | const struct key_type *, |
232 | unsigned long, | ||
233 | const union key_payload *)); | 230 | const union key_payload *)); |
234 | 231 | ||
235 | 232 | ||
236 | #define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ | 233 | #define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ |
237 | #define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ | 234 | #define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ |
238 | #define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ | 235 | #define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ |
239 | #define KEY_ALLOC_TRUSTED 0x0004 /* Key should be flagged as trusted */ | 236 | #define KEY_ALLOC_BUILT_IN 0x0004 /* Key is built into kernel */ |
240 | #define KEY_ALLOC_BUILT_IN 0x0008 /* Key is built into kernel */ | 237 | #define KEY_ALLOC_BYPASS_RESTRICTION 0x0008 /* Override the check on restricted keyrings */ |
241 | #define KEY_ALLOC_BYPASS_RESTRICTION 0x0010 /* Override the check on restricted keyrings */ | ||
242 | 238 | ||
243 | extern void key_revoke(struct key *key); | 239 | extern void key_revoke(struct key *key); |
244 | extern void key_invalidate(struct key *key); | 240 | extern void key_invalidate(struct key *key); |
@@ -309,18 +305,11 @@ extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid | |||
309 | unsigned long flags, | 305 | unsigned long flags, |
310 | int (*restrict_link)(struct key *, | 306 | int (*restrict_link)(struct key *, |
311 | const struct key_type *, | 307 | const struct key_type *, |
312 | unsigned long, | ||
313 | const union key_payload *), | 308 | const union key_payload *), |
314 | struct key *dest); | 309 | struct key *dest); |
315 | 310 | ||
316 | extern int keyring_restrict_trusted_only(struct key *keyring, | ||
317 | const struct key_type *type, | ||
318 | unsigned long, | ||
319 | const union key_payload *payload); | ||
320 | |||
321 | extern int restrict_link_reject(struct key *keyring, | 311 | extern int restrict_link_reject(struct key *keyring, |
322 | const struct key_type *type, | 312 | const struct key_type *type, |
323 | unsigned long flags, | ||
324 | const union key_payload *payload); | 313 | const union key_payload *payload); |
325 | 314 | ||
326 | extern int keyring_clear(struct key *keyring); | 315 | extern int keyring_clear(struct key *keyring); |