diff options
author | David Howells <dhowells@redhat.com> | 2013-09-24 05:35:18 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-09-24 05:35:18 -0400 |
commit | ab3c3587f8cda9083209a61dbe3a4407d3cada10 (patch) | |
tree | c479efb4b7a834ee5d3b74d81560a2214c463431 /include/keys | |
parent | b2a4df200d570b2c33a57e1ebfa5896e4bc81b69 (diff) |
KEYS: Implement a big key type that can save to tmpfs
Implement a big key type that can save its contents to tmpfs and thus
swapspace when memory is tight. This is useful for Kerberos ticket caches.
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'include/keys')
-rw-r--r-- | include/keys/big_key-type.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/keys/big_key-type.h b/include/keys/big_key-type.h new file mode 100644 index 000000000000..d69bc8af3292 --- /dev/null +++ b/include/keys/big_key-type.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* Big capacity key type. | ||
2 | * | ||
3 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _KEYS_BIG_KEY_TYPE_H | ||
13 | #define _KEYS_BIG_KEY_TYPE_H | ||
14 | |||
15 | #include <linux/key-type.h> | ||
16 | |||
17 | extern struct key_type key_type_big_key; | ||
18 | |||
19 | extern int big_key_instantiate(struct key *key, struct key_preparsed_payload *prep); | ||
20 | extern void big_key_revoke(struct key *key); | ||
21 | extern void big_key_destroy(struct key *key); | ||
22 | extern void big_key_describe(const struct key *big_key, struct seq_file *m); | ||
23 | extern long big_key_read(const struct key *key, char __user *buffer, size_t buflen); | ||
24 | |||
25 | #endif /* _KEYS_BIG_KEY_TYPE_H */ | ||