]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/key.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[linux-2.6-omap-h63xx.git] / include / linux / key.h
index 4d189e51bc6c37aff256c16ffdf5260044d19329..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;
@@ -218,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 */
 };