X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Fkey.h;h=cbf464ad9589526d139b369ea3c00f5b920348c9;hb=364c6badde0dd62a0a38e5ed67f85d87d6665780;hp=53513a3be53ba745ad900fae33d7727c0dbaca9b;hpb=87199134b4a85de56a7508c551ab3b3a3ee35035;p=powerpc.git diff --git a/include/linux/key.h b/include/linux/key.h index 53513a3be5..cbf464ad95 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -177,6 +177,8 @@ struct key { /* * kernel managed key type definition */ +typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); + struct key_type { /* name of the type */ const char *name; @@ -193,14 +195,6 @@ struct key_type { */ int (*instantiate)(struct key *key, const void *data, size_t datalen); - /* duplicate a key of this type (optional) - * - the source key will be locked against change - * - the new description will be attached - * - the quota will have been adjusted automatically from - * source->quotalen - */ - int (*duplicate)(struct key *key, const struct key *source); - /* update a key of this type (optional) * - this method should call key_payload_reserve() to recalculate the * quota consumption @@ -226,6 +220,16 @@ struct key_type { */ long (*read)(const struct key *key, char __user *buffer, size_t buflen); + /* handle request_key() for this type instead of invoking + * /sbin/request-key (optional) + * - key is the key to instantiate + * - authkey is the authority to assume when instantiating this key + * - op is the operation to be done, usually "create" + * - the call must not return until the instantiation process has run + * its course + */ + request_key_actor_t request_key; + /* internal fields */ struct list_head link; /* link in types list */ };