diff options
Diffstat (limited to 'include/linux/key.h')
| -rw-r--r-- | include/linux/key.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index e81ebf910d0b..169f05e4863e 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -177,7 +177,8 @@ struct key { | |||
| 177 | /* | 177 | /* |
| 178 | * kernel managed key type definition | 178 | * kernel managed key type definition |
| 179 | */ | 179 | */ |
| 180 | typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); | 180 | typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, |
| 181 | const char *op, void *aux); | ||
| 181 | 182 | ||
| 182 | struct key_type { | 183 | struct key_type { |
| 183 | /* name of the type */ | 184 | /* name of the type */ |
| @@ -248,7 +249,14 @@ extern struct key *key_alloc(struct key_type *type, | |||
| 248 | const char *desc, | 249 | const char *desc, |
| 249 | uid_t uid, gid_t gid, | 250 | uid_t uid, gid_t gid, |
| 250 | struct task_struct *ctx, | 251 | struct task_struct *ctx, |
| 251 | key_perm_t perm, int not_in_quota); | 252 | key_perm_t perm, |
| 253 | unsigned long flags); | ||
| 254 | |||
| 255 | |||
| 256 | #define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ | ||
| 257 | #define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ | ||
| 258 | #define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ | ||
| 259 | |||
| 252 | extern int key_payload_reserve(struct key *key, size_t datalen); | 260 | extern int key_payload_reserve(struct key *key, size_t datalen); |
| 253 | extern int key_instantiate_and_link(struct key *key, | 261 | extern int key_instantiate_and_link(struct key *key, |
| 254 | const void *data, | 262 | const void *data, |
| @@ -278,6 +286,11 @@ extern struct key *request_key(struct key_type *type, | |||
| 278 | const char *description, | 286 | const char *description, |
| 279 | const char *callout_info); | 287 | const char *callout_info); |
| 280 | 288 | ||
| 289 | extern struct key *request_key_with_auxdata(struct key_type *type, | ||
| 290 | const char *description, | ||
| 291 | const char *callout_info, | ||
| 292 | void *aux); | ||
| 293 | |||
| 281 | extern int key_validate(struct key *key); | 294 | extern int key_validate(struct key *key); |
| 282 | 295 | ||
| 283 | extern key_ref_t key_create_or_update(key_ref_t keyring, | 296 | extern key_ref_t key_create_or_update(key_ref_t keyring, |
| @@ -285,7 +298,7 @@ extern key_ref_t key_create_or_update(key_ref_t keyring, | |||
| 285 | const char *description, | 298 | const char *description, |
| 286 | const void *payload, | 299 | const void *payload, |
| 287 | size_t plen, | 300 | size_t plen, |
| 288 | int not_in_quota); | 301 | unsigned long flags); |
| 289 | 302 | ||
| 290 | extern int key_update(key_ref_t key, | 303 | extern int key_update(key_ref_t key, |
| 291 | const void *payload, | 304 | const void *payload, |
| @@ -299,7 +312,7 @@ extern int key_unlink(struct key *keyring, | |||
| 299 | 312 | ||
| 300 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | 313 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, |
| 301 | struct task_struct *ctx, | 314 | struct task_struct *ctx, |
| 302 | int not_in_quota, | 315 | unsigned long flags, |
| 303 | struct key *dest); | 316 | struct key *dest); |
| 304 | 317 | ||
| 305 | extern int keyring_clear(struct key *keyring); | 318 | extern int keyring_clear(struct key *keyring); |
