[linux-cifs-client] [PATCH 1/5] [CIFS] add ver= prefix to upcall
format version
Jeff Layton
jlayton at redhat.com
Fri Nov 16 12:52:08 GMT 2007
...and change outdated comment.
Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
fs/cifs/cifs_spnego.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index ad54a3a..f9fd8aa 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -75,11 +75,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char *hostname)
size_t desc_len;
struct key *spnego_key;
-
- /* version + ;ip{4|6}= + address + ;host=hostname +
- ;sec= + ;uid= + NULL */
- desc_len = 4 + 5 + 32 + 1 + 5 + strlen(hostname) +
- strlen(";sec=krb5") + 7 + sizeof(uid_t)*2 + 1;
+ /* BB: come up with better scheme for determining length */
+ desc_len = 7 + 5 + 32 + 1 + 5 + strlen(hostname) +
+ strlen(";sec=ntlmssp") + 7 + sizeof(uid_t)*2 + 1;
spnego_key = ERR_PTR(-ENOMEM);
description = kzalloc(desc_len, GFP_KERNEL);
if (description == NULL)
@@ -88,7 +86,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char *hostname)
dp = description;
/* start with version and hostname portion of UNC string */
spnego_key = ERR_PTR(-EINVAL);
- sprintf(dp, "0x%2.2x;host=%s;", CIFS_SPNEGO_UPCALL_VERSION,
+ sprintf(dp, "ver=%d;host=%s;", CIFS_SPNEGO_UPCALL_VERSION,
hostname);
dp = description + strlen(description);
--
1.5.3.3
More information about the linux-cifs-client
mailing list