KEYS: Add a new keyctl op to reject a key with a specified error code
[linux-2.6.git] / include / linux / key-type.h
index fc8525e..9efd081 100644 (file)
@@ -105,11 +105,20 @@ extern int key_instantiate_and_link(struct key *key,
                                    size_t datalen,
                                    struct key *keyring,
                                    struct key *instkey);
-extern int key_negate_and_link(struct key *key,
+extern int key_reject_and_link(struct key *key,
                               unsigned timeout,
+                              unsigned error,
                               struct key *keyring,
                               struct key *instkey);
 extern void complete_request_key(struct key_construction *cons, int error);
 
+static inline int key_negate_and_link(struct key *key,
+                                     unsigned timeout,
+                                     struct key *keyring,
+                                     struct key *instkey)
+{
+       return key_reject_and_link(key, timeout, ENOKEY, keyring, instkey);
+}
+
 #endif /* CONFIG_KEYS */
 #endif /* _LINUX_KEY_TYPE_H */