diff options
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index 53513a3be53b..cbf464ad9589 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -177,6 +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); | ||
181 | |||
180 | struct key_type { | 182 | struct key_type { |
181 | /* name of the type */ | 183 | /* name of the type */ |
182 | const char *name; | 184 | const char *name; |
@@ -193,14 +195,6 @@ struct key_type { | |||
193 | */ | 195 | */ |
194 | int (*instantiate)(struct key *key, const void *data, size_t datalen); | 196 | int (*instantiate)(struct key *key, const void *data, size_t datalen); |
195 | 197 | ||
196 | /* duplicate a key of this type (optional) | ||
197 | * - the source key will be locked against change | ||
198 | * - the new description will be attached | ||
199 | * - the quota will have been adjusted automatically from | ||
200 | * source->quotalen | ||
201 | */ | ||
202 | int (*duplicate)(struct key *key, const struct key *source); | ||
203 | |||
204 | /* update a key of this type (optional) | 198 | /* update a key of this type (optional) |
205 | * - this method should call key_payload_reserve() to recalculate the | 199 | * - this method should call key_payload_reserve() to recalculate the |
206 | * quota consumption | 200 | * quota consumption |
@@ -226,6 +220,16 @@ struct key_type { | |||
226 | */ | 220 | */ |
227 | long (*read)(const struct key *key, char __user *buffer, size_t buflen); | 221 | long (*read)(const struct key *key, char __user *buffer, size_t buflen); |
228 | 222 | ||
223 | /* handle request_key() for this type instead of invoking | ||
224 | * /sbin/request-key (optional) | ||
225 | * - key is the key to instantiate | ||
226 | * - authkey is the authority to assume when instantiating this key | ||
227 | * - op is the operation to be done, usually "create" | ||
228 | * - the call must not return until the instantiation process has run | ||
229 | * its course | ||
230 | */ | ||
231 | request_key_actor_t request_key; | ||
232 | |||
229 | /* internal fields */ | 233 | /* internal fields */ |
230 | struct list_head link; /* link in types list */ | 234 | struct list_head link; /* link in types list */ |
231 | }; | 235 | }; |