[linux-cifs-client] [PATCH 4/5] cifs: add mechListMIC string to SPNEGO upcall key description

Jeff Layton jlayton at redhat.com
Mon Aug 18 19:41:08 GMT 2008


Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
 fs/cifs/cifs_spnego.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 2434ab0..5a2ef2d 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -88,7 +88,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
 		   5 /* len of ";ipv4=" */ + MAX_IPV6_ADDR_LEN +
 		   MAX_MECH_STR_LEN +
 		   7 /* len of ";uid=0x" */ + (sizeof(uid_t) * 2) +
-		   6 /* len of ";user=" */ + strlen(sesInfo->userName) + 1;
+		   6 /* len of ";user=" */ + strlen(sesInfo->userName) + 
+		   5 /* len of ";mic=" */ + strlen(server->mechListMIC) +
+		   1 /* terminating NULL */;
 
 	spnego_key = ERR_PTR(-ENOMEM);
 	description = kzalloc(desc_len, GFP_KERNEL);
@@ -126,6 +128,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
 	dp = description + strlen(description);
 	sprintf(dp, ";user=%s", sesInfo->userName);
 
+	dp = description + strlen(description);
+	sprintf(dp, ";mic=%s", server->mechListMIC);
+	
 	cFYI(1, ("key description = %s", description));
 	spnego_key = request_key(&cifs_spnego_key_type, description, "");
 
-- 
1.5.5.1



More information about the linux-cifs-client mailing list