]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/key.h
Merge Zaurus branch
[linux-2.6-omap-h63xx.git] / include / linux / key.h
index 53513a3be53ba745ad900fae33d7727c0dbaca9b..cbf464ad9589526d139b369ea3c00f5b920348c9 100644 (file)
@@ -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 */
 };