Skip to contentSkip to conversation

cifs: account for new creduid=0x%x parameter in spnego upcall string

PATCH In review Jeff Layton 2 participants 2 messages Aug 3, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: account for new creduid=0x%x parameter in spnego upcall string

The commit that added the creduid=0x%x parameter failed to increase the buffer allocation to account for it.

---
 fs/cifs/cifs_spnego.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
fs/cifs/cifs_spnego.c +4 -0
index 6effccf..8704490 100644
@@ -84,6 +84,9 @@ struct key_type cifs_spnego_key_type = {
 /* strlen of ";uid=0x" */
 #define UID_KEY_LEN		7
 
+/* strlen of ";creduid=0x" */
+#define CREDUID_KEY_LEN		11
+
 /* strlen of ";user=" */
 #define USER_KEY_LEN		6
 
@@ -107,6 +110,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
 		   IP_KEY_LEN + INET6_ADDRSTRLEN +
 		   MAX_MECH_STR_LEN +
 		   UID_KEY_LEN + (sizeof(uid_t) * 2) +
+		   CREDUID_KEY_LEN + (sizeof(uid_t) * 2) +
 		   USER_KEY_LEN + strlen(sesInfo->userName) +
 		   PID_KEY_LEN + (sizeof(pid_t) * 2) + 1;
 
Signature · 1 line
1.7.2

A message that is not in the archive (sent off-list or not yet received): 1280845241-12305-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#2 lore raw

looks fine

Quoted 35 lines · Jeff Layton

The commit that added the creduid=0x%x parameter failed to increase the buffer allocation to account for it.

---
 fs/cifs/cifs_spnego.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
fs/cifs/cifs_spnego.c +3 -0
index 6effccf..8704490 100644
@@ -84,6 +84,9 @@ struct key_type cifs_spnego_key_type = {
  /* strlen of ";uid=0x" */
  #define UID_KEY_LEN            7
 
+/* strlen of ";creduid=0x" */
+#define CREDUID_KEY_LEN                11
+
  /* strlen of ";user=" */
  #define USER_KEY_LEN           6
 
@@ -107,6 +110,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)

                  IP_KEY_LEN + INET6_ADDRSTRLEN + MAX_MECH_STR_LEN +
                  UID_KEY_LEN + (sizeof(uid_t) * 2) +
+                  CREDUID_KEY_LEN + (sizeof(uid_t) * 2) + USER_KEY_LEN + strlen(sesInfo->userName) + PID_KEY_LEN + (sizeof(pid_t) * 2) + 1;

--
1.7.2

Signature · 3 lines
Thanks,

Steve