Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/keyfs/rootfile.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff -puN fs/keyfs/rootfile.c~support-supplementary-information-for-request-key-keyfs fs/keyfs/rootfile.c
--- 25/fs/keyfs/rootfile.c~support-supplementary-information-for-request-key-keyfs	Thu Sep 23 14:26:41 2004
+++ 25-akpm/fs/keyfs/rootfile.c	Thu Sep 23 14:26:41 2004
@@ -198,7 +198,7 @@ static ssize_t keyfs_request_key_write(s
 	struct key_type *ktype;
 	struct key *key;
 	ssize_t ret;
-	char *buffer, *bend, *p, *type, *desc;
+	char *buffer, *bend, *p, *type, *desc, *info;
 
 	ret = -EINVAL;
 	if (rec->state != KEYFS_BIFILE_WANT_PARAMS || buflen > 40000)
@@ -220,6 +220,7 @@ static ssize_t keyfs_request_key_write(s
 
 	/* parse the parameter string */
 	ret = -EINVAL;
+	info = NULL;
 
 	type = buffer;
 
@@ -234,6 +235,15 @@ static ssize_t keyfs_request_key_write(s
 		goto error2;
 	*p++ = 0;
 
+	if (p != bend) {
+		info = p;
+
+		p = memchr(p, '\n', bend - p);
+		if (!p)
+			goto error2;
+		*p++ = 0;
+	}
+
 	if (p != bend)
 		goto error2;
 
@@ -245,7 +255,7 @@ static ssize_t keyfs_request_key_write(s
 	}
 
 	/* request the key */
-	key = request_key(ktype, desc, 1);
+	key = request_key(ktype, desc, info);
 	if (IS_ERR(key)) {
 		ret = PTR_ERR(key);
 		goto error3;
_